Video summary

برنامه‌نویسی به زبان پایتون |‌ Command-Line Crash Course

Main summary

Key takeaways

Educational

Main ideas / lessons

  • You’re transitioning from learning filesystem structure to learning how to use a terminal/command line to perform common file and directory tasks.
  • The session focuses on a small, essential set of commands sufficient to continue learning later (more commands will come in the Linux course).
  • Don’t expect mastery immediately: the presenter emphasizes that being slow/confused at first is normal; repeated practice will build confidence.
  • Using the terminal is efficient and flexible:
    • Faster than GUI work (keyboard-only workflow instead of switching between mouse and keyboard).
    • Customizable later to fit your needs.
    • Enables automation via scripting (useful for repetitive tasks).

Method / instruction list

Part 1: Navigate the filesystem (key commands)

  • cd — change directory
  • ls — list directory contents (folders/files in the current path)
  • pwd — print working directory (show exactly where you are)

Common navigation tasks

  • Check your current location:
    • Run pwd
  • List what’s in the current folder:
    • Run ls

Move to another folder

  • Relative navigation (paths based on your current location):
    • Example pattern: cd <folderName>
    • Example shown: cd Desktop (after being in “home”)
  • Absolute navigation (paths from the root using /):
    • Example pattern: cd /<full/path/from/root>

Backtracking / moving upward in directories

  • cd .. — go back one directory (parent)
  • Limit note: you can’t go “above” the root directory.

Return to the home directory (3 ways shown)

  • cd ~ (tilde means home)
  • cd /Users/<username> (explicit absolute path using your username)
  • cd with no arguments (defaults to home)

Common mistakes & how to avoid them

  • If you mistype a directory name (e.g., wrong spelling), you’ll get an error like “No such file or directory”.
  • Use autocomplete with Tab:
    • Type the beginning of a folder/file name, then press Tab
    • If multiple matches exist, pressing Tab cycles/options are shown.
  • Multi-level jumps without intermediate cd:
    • Use paths directly like cd Desktop/Images (faster and less error-prone than step-by-step)

Part 2: Work with files and directories

The presenter switches into a temp directory (for a clean workspace) and demonstrates create/remove/copy/move/rename.

1) Create directories

  • Use mkdir
    • (Subtitles show it as something like “emk dir” / “omdir”.)
    • Example pattern: mkdir temp
    • Example pattern: mkdir <folderName>
  • Verify with ls

2) Create files

  • Use touch to create an empty file (or update timestamp)
    • Example pattern: touch <fileName>

3) Delete files and directories

  • Delete a file:
    • Use rm <file>
  • Delete a directory recursively:
    • Use rm -r <directory>
    • This is necessary because directories may contain files/subfolders.

Irreversibility warning: Deletion with rm is not reversible (not like a recycle bin).

  • Safer deletion of only-empty directories:
    • Use rmdir
    • Behavior: deletes a directory only if it is empty
    • If the directory contains items, it will refuse to delete and report it’s not empty.

4) Copy files and directories

  • Use cp to copy from one location to another:
    • General form: cp <source> <destination>
    • Source and destination can be absolute or relative paths
  • Copying example concept shown:
    • Copy a file to another directory (e.g., desktop)
    • Verify by listing the destination and checking the file exists
  • Copying within the same location:
    • You can copy without changing directories by using paths/targets appropriately.

5) Move files and rename

  • Use mv for:
    • Moving files between directories
    • Renaming by specifying a new name in the destination
  • Key behavior explained:
    • mv to another directory typically moves the file (optionally with a new name).
    • If you “move” within the same directory with a different name, it acts like a rename.

Additional helpful commands (workflow comfort)

  • history — shows previously used commands
    • Useful to repeat commands without retyping.
  • Command recall with arrows:
    • Use Up/Down arrow keys to retrieve previous commands.
  • clear — clears the terminal screen visually
    • Does not erase command history permanently; scrollback may still show past commands.

Download commands mentioned (future use)

  • wget — download files from the web (mentioned as used later in installations)
  • curl — another web download/transfer tool (often appears in setup instructions)

Presenter’s instruction: Expect to see wget/curl later when installing tools like KDE or VS Code. Copy/paste their commands from the internet into the terminal to download required files.

Overall takeaway

  • Mastery comes from practice, not from first-time perfection.
  • Learn core navigation + file operations early:
    • pwd, ls, cd
    • mkdir, touch, rm, rmdir, cp, mv
    • Plus productivity: history, arrow-key recall, clear
  • Understand path concepts (relative vs absolute; .., and the current directory implied in explanation) and leverage Tab autocomplete to avoid typos.

Speakers / sources featured

  • Single unnamed instructor/presenter (the narrator/teacher in the video).

Rate this summary

Your feedback will help improve summaries.

Improve this summary

Reprocess with a stronger model when the summary feels incomplete or inaccurate.

Pro

Translate summary in another language

Pro

Ask questions to this video

Chat for follow-up questions, clarifications, and source-backed answers.

Coming soon

Share this summary

Original video