Back to DevOps Series

All basic commands:

  1. man Used to see help/manual of a command. Example: man ls
  1. ls Shows files and folders. Example: ls
  1. pwd Shows current directory path. Example: pwd
  1. cd Change directory. Example: cd Documents
  1. ls and ls -a ls → normal files ls -a → shows hidden files Example: ls -a
  1. ls -l Shows detailed file info. Example: ls -l
  1. ls -al Shows detailed + hidden files. Example: ls -al
  1. ls -alh Shows size in KB/MB (easy to read). Example: ls -alh
  1. ls -alht Sort files from newest to oldest. Example: ls -alht
  1. ls -alhtr Sort files from oldest to newest. Example: ls -alhtr
  1. ls -l --sort=time Sort by time (newest first). Example: ls -l --sort=time
  1. ls -l --sort=time -r Sort by time (oldest first). Example: ls -l --sort=time -r
  1. cd .. and cd . cd .. → go one folder up cd . → stay in same folder Example: cd ..
  1. cd / and cd ~ cd / → go to root directory cd ~ → go to home directory Example: cd ~
  1. mkdir Create a folder. Example: mkdir myFolder
  1. Touch
    1. If you touch a non-existing file, it will be created. But if you touch an existing file, its modification time will be updated.
       
    notion image
     
     
    notion image