2.5. Filesystem Basics
- Linux organizes its file in directories, where each directory can contain files or other directories.
- There is one topmost directory which is called the root directory, and is labelled as /.
- The . meta directory designated the current directory. ".." is the directory above it. If a / is prefixed at the beginning than the path would be absolute.
- The cd command changes the current working directory to a different directory. The pwd command prints the path of the current working directory.
- Here's an example session at the command line:
shlomi:~$ cd /usr shlomi:/usr$ pwd /usr shlomi:/usr$ cd local/bin shlomi:/usr/local/bin$ pwd /usr/local/bin shlomi:/usr/local/bin$ cd ../../share shlomi:/usr/share$ pwd /usr/share shlomi:/usr/share$ cd /usr/share/doc/ shlomi:/usr/share/doc$ pwd /usr/share/doc shlomi:/usr/share/doc$ cd ./vim-X11-6.1/ shlomi:/usr/share/doc/vim-X11-6.1$ pwd /usr/share/doc/vim-X11-6.1 shlomi:/usr/share/doc/vim-X11-6.1$ cd .. shlomi:/usr/share/doc$ cd rsync-2.5.6/ shlomi:/usr/share/doc/rsync-2.5.6$ pwd /usr/share/doc/rsync-2.5.6 shlomi:/usr/share/doc/rsync-2.5.6$ |