Goal
Navigate the filesystem like a pro in 3 minutes.
Where Am I?
First, let's find out where you are in the filesystem:
bash
$ pwd
This prints your current directory. You should see /home/ubuntu.
What's Here?
List the contents of your current directory:
bash
$ ls
With ACFS, this is aliased to lsd which shows beautiful icons.
Try these variations:
Long format with details
Show hidden files
Tree view of directories
Moving Around
Navigate the filesystem with the cd command:
Go to the projects directory
Go home (shortcut)
Go up one level
Go to previous directory
Pro Tip
With zoxide installed, you can use
z projects to jump to /data/projects after visiting it once!Creating Things
Create new directories and files:
Create a directory
Create AND cd into it (ACFS function)
Create an empty file
Viewing Files
Read file contents in different ways:
Print entire file (aliased to bat)
Scroll through file (q to quit)
First 20 lines
Last 20 lines
Deleting Things
Warning
There's no trash can in Linux. Deleted = gone.
Delete a file
Delete a directory (DANGEROUS!)
Searching
Find files and search their contents:
Search file contents (ripgrep)
Find files by name
Verify You Learned It
Try this sequence to test your new skills:
bash
1$ cd /data/projects2$ mkcd acfs-test3$ pwd4$ touch hello.txt5$ ls6$ cat hello.txt7$ cd ..8$ ls
All Commands Work?
You're ready for the next lesson!