Linux Frequently Used Commands

PurposeCommand
know the working directory of any
file or directory
pwd   present working directory
 
or cd space single dot
List files and directoriesls
List files including hidden files and directoriesls space  -a
ClearingScreenclear
Change to son Change to son directory
From current working directory
cd space sondirectoryname

cd /c –> / represents change directory to root directory and from root directory change to c directory

cd /c/ravi –> / represents change directory to root directory and from root directory move to c/ravi directory
Go from current working directory to current working directorycd . cd space singledot or pwd
Go to parent directorycd space ..
Go to grandparent directorycd space ../..
Directly go to your home directory from any directorycd  or  cd space ~  
Create single directorymkdir [directoryname]
create multiple directoriesmkdir [directoryname]  [anotherdirectoryname] 
create single filetouch filename.fileextension
create multiple filestouch filename.fileextension  Anotherfilename.fileextension
see what is written on a file without opening itcat filename.fileextension 
Delete a filerm filename.fileextension
Delete multiple filesrm filename.fileextension  anotherfilename.fileextension
Delete a empty Directoryrmdir directoryname
Delete multiple empty directoriesrmdir directoryname anotherdirectoryname
Copy a File or Directorycp sourcefilenameordirectorywithpath destinationwithpath
Move a File or Directorymv source  destination
Rename a filemv

Leave a Comment

Your email address will not be published. Required fields are marked *