Skip to content

Latest commit

 

History

History

file-system

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

File Systems

Watch the File System video on TwilioDevs YouTube channel

Terminal Commands

List Files

*nix (Mac/Linux) Shells

# List files in the current directory
ls

Windows Shells

# Lists 
dir

Change Directories

# Goes up a directory
cd ..
# Directories are relative to your current location
# Move into the directory named photos
cd photos

Important In *nix based terminals (Mac/Linux), a forward slash / separates directories. Windows uses a backslash \.

Rename a File

# mv is short for move and allows you to rename a file (and move it to a new folder)
mv poorly-named-file.txt mv better.txt

Make a copy

# cp is short for copy
cp myfile.txt myfile2.txt

Practice

From the GUI: Clean up your Downloads Folder

  • Locate your Downloads folder
  • Create a new Folder called Older Files
  • Move any downloaded file that you no longer want into Older Files
  • Delete files you no longer want

From the Terminal: Remove that directory

  • Change directories into Downloads/Older Files
  • Remove a file using rm

Learning Resources

  • TwilioQuest: The first floor of the Tower of Infinite Knowledge in TwilioQuest focusses on File Systems. Check it out! (This video even plays there on a VCR! 📼)