← Shell Scripting (Bash) learning path
Shell Scripting (Bash) · Module 2 of 10

Files and directories

Navigate and manage files from the command line.

📖 Key ideas

  1. pwd shows where you are; cd changes directory.
  2. ls lists files; ls -la shows hidden files and details.
  3. mkdir creates folders; touch creates empty files.
  4. cp copies, mv moves/renames, rm deletes (rm -r for folders).
  5. Paths: absolute (/home/user) vs relative (../docs).
💡 Real-life example: cd is walking between rooms; ls is looking around the room.
pwdPrint working directory
cdChange directory
rm -rRemove recursively
Absolute pathPath starting from /