Basic command of Linux
File Commands
ls - List the content of the current directory
ls -R - List the subdirectories recursively
ls -a - List all the content, including hidden files
ls -l - List the content and its information
pwd - Output the current directory that you are in
cd folder1 – Change the working directory to folder1
cd - Return to the $Home directory
cd .. - Go up a directory
cd - - Return to the previous directory
cp source destination – Copy source to destination
cp -r source destination – Copy a folder recursively from
source to destination
source to destination
mv source destination - Move (or rename) a file from source to
destination
destination
rm file1 - Remove file1
rm -f file1 - Remove file1 without prompt
rm -r folder - Remove a folder and its content recursively
mkdir foldername – Create a new folder foldername
rmdir foldername – Remove an empty folder
less file1 - View and paginate file1
head file1 - Show first 10 lines of file1
tail file1 - Show last 10 lines of file1