Cheatsheet: Some most useful bash commands
Table of contents
No headings in the article.
Bash is a popular default shell on Linux and macOS.
Below are few bash commands to complete the following tasks:
pwd
: is for print the current working directory.
cd
: to navigate between directories on your computer.
If you are in directory "temp" and inside "temp" there is a folder "remp", you want to navigate to "remp", so you can go by : cd remp
mkdir
: for create new directories/folders.
ls
: print a list of files and subdirectories within directories.
rm
: delete files.
rm -r
: delete files and directories.
cp
: copy files.
cp -r
: copy files and directories to another directory.
touch
: to easily create new files using a single command.
Thank you.