Browse The File System

cd changes derectories

  • cd 
    • To your home directory
  • cd ..
    • To your home directory
  • cd -
    • To your previous working directory

Listing Directory Contents

  • ls -a 
    • include hidden files
  • ls -l
    • long listing style
  • ls -R
    • Recurse through directories

Copying Files & Directories

  • cp -i source destination
    • interactive(ask before overwriting file)
  • cp -R source destination
    • recursive (recursively copy an entire directory tree)

Creating & Removing Files

  • touch 
    • create empty file or update filetimestamps
  • rm -i 
    • interactive(ask before removing file)
  • rm -R
    • recursively (for removing an entire directory)
  • rm -f
    • remove by forcing
  • mkdir -p
    • make parent directories if needed

Leave a Comment