| Linux | Security | Debian | Slax | Tiny Core | Health |
|
If a Computer Won't Start from a CD, DVD or USB Drive List the Contents of a Directory Mount an ISO Image Without Writing it to a CD or DVD |
LinuxChange DirectoryRoot Directory or Current DirectoryIf the name of a directory or file is written with a forward slash at the beginning, this indicates its location in relation to the root directory. It does not matter which directory you are in. If the name of a directory or file is written without a forward slash at the beginning, this indicates its location in relation to the current directory. For example, if you were in the directory /home/ron/, for the same file, you could use:
or
List the Contents of a DirectoryTo list the contents of a directory, type:
For more details, type:
Change to Another DirectoryTo change to another directory, type:
For example, if you were in the directory /home/ron/, to change to the directory pictures, type:
From any location you could also type:
To change to a directory within a directory, type:
You can go as many levels as you like. Change Up to the Directory Containing the One You are InTo change up to the directory containing the one you are in, type:
For example, you could use this to change up to /home/, if you were in the directory /home/ron/. To change up two levels, type:
You can go as many levels as you like. For three levels, type:
To change to a directory in the one up from where you are, type:
Change to Root DirectoryTo change to the root directory, type:
To change to a directory within the root directory, type:
Change to Home DirectoryTo change to the home directory, type:
Be aware, if you are using the Root Terminal, this takes you to root's home, not your home. To change to a directory within the home directory, type:
Execute a CommandTo execute a command, you can either execute it from where you are, and include the path, or use the cd command to change to that directory, then execute it. For example, if you were in the directory /home/ron/, to list the directories and files in the directory pictures, you could type:
or
From anywhere you could type:
or
This applies when executing any command. © Copyright Guy Shipard 2008 - 2009 |