Skip to content

Latest commit

 

History

History
29 lines (27 loc) · 1.21 KB

File metadata and controls

29 lines (27 loc) · 1.21 KB

CLI

Most used commands

Command Description
pwd present working directory
ls List files in the directory
cd change the directory
touch Create an empty file
echo display the string
echo -n Display the string without newline
echo “something” > file Redirect the output of echo and create file
echo “another thing” >> file Append the string to the file
mkdir make a new directory
cd ~ home
cd - previous directory
cd .. parent directory
ls -a List all files including hidden files
cd / change to the root directory
cat Concatenate the file line by line and display it on the terminal
less Print the big file line by line
vim <file> open the editor with {a: to go to the insert mode, :wq to write and quit }
for var in {START..END}; do <COMMAND1>; <COMMAND2>;..; ; done
head <file> display the first 10 lines of file
tail <file> display the last 10 lines of file
head -n <file> display first n lines of file
tail -n <file> display last n lines of file
man <COMMAND> Display manual of the COMMAND