முக்கிய உள்ளடக்கத்திற்குச் செல்லவும்
eLearner.app
தொகுதி 1 · பாடம் 2 இன் 2பாடத்திட்டத்தில் 2/11~12 min
தொகுதி பாடங்கள் (2/2)

கோப்பு முறைமையைச் சுற்றி நகர்த்துதல் (சிடி)

To move from one folder to another in the Linux file system, use the command:

Bash
cd [path]

This command stands for Change Directory. The path of the folder you want to enter can be specified in two ways: using an absolute path or a relative path.


Absolute vs Relative Paths

  1. Absolute Path: Always starts from the root / and describes the entire path to the destination.

    • Example: cd /home/user/documents
    • No matter which folder you are currently in, an absolute path will always direct you to the same place.
  2. Relative Path: Starts from your current directory.

    • Example: If you are already in /home/user, to enter /home/user/documents you only need to type cd documents (without a forward slash / at the beginning).

Special Shortcuts

Linux provides several useful shortcuts to navigate quickly:

  • . (single dot): Represents the current directory.
  • .. (double dot): Represents the parent directory (one level up in the directory tree).
    • Example: If you are in /home/user/documents, typing cd .. will take you up to /home/user.
  • ~ (tilde): Represents your home directory (/home/user). Typing cd ~ (or simply cd with no arguments) will instantly return you home.

Navigation Examples and Common Errors

If you try to access a directory that does not exist, the terminal will show you an error like this:

Bash
cd nonexistent_folder
# Output:
# cd: nonexistent_folder: No such file or directory

You can chain navigation or use pwd to verify the effect of changing folders:

Bash
cd documents
pwd
# Output:
# /home/user/documents

Try it yourself

Exercise 1: Enter a folder

உடற்பயிற்சி#linux.m1.l2.e1
முயற்சிகள்: 0ஏற்றுகிறது…

Move inside the 'documents' directory using a relative path.

எடிட்டரை ஏற்றுகிறது…
குறிப்பைக் காட்டு

Use the cd command followed by the name of the destination folder.

3 முயற்சிகளுக்குப் பிறகு தீர்வு கிடைக்கும்

Exercise 2: Go up one level

உடற்பயிற்சி#linux.m1.l2.e2
முயற்சிகள்: 0ஏற்றுகிறது…

Move back to the parent directory relative to your current location.

எடிட்டரை ஏற்றுகிறது…
குறிப்பைக் காட்டு

Use cd followed by the special shortcut for the parent folder.

3 முயற்சிகளுக்குப் பிறகு தீர்வு கிடைக்கும்

Exercise 3: Return Home

உடற்பயிற்சி#linux.m1.l2.e3
முயற்சிகள்: 0ஏற்றுகிறது…

Move inside the 'documents' directory and immediately after return to your home directory using the ~ special shortcut.

எடிட்டரை ஏற்றுகிறது…
குறிப்பைக் காட்டு

First use cd followed by documents, then use cd followed by ~.

3 முயற்சிகளுக்குப் பிறகு தீர்வு கிடைக்கும்