Skip to content
KAGETERM

$ ./gezinti

Moving around directories

Last updated: status: in effect

Know where you are and move quickly between directories.

About this topic

Tool
Core commands
Level
Basic
Commands
7
Access
Free

Commands

pwd

Prints the full path of the current directory.

pwd
print working directory: show the current directory

ls -la

Lists everything in the directory in detail.

ls
lists directory contents
-l
long format: permissions, owner, size, date
a
also shows hidden files that start with a dot

ls -lh /var/log

Lists a directory with human-readable sizes.

ls
lists directory contents
-lh
long format, sizes as K / M / G
/var/log
directory to list

cd projects/kageterm

Moves into a subdirectory.

cd
change directory
projects/kageterm
path to go to (relative)

cd ..

Moves up to the parent directory.

cd
change directory
..
means the parent directory

cd -

Returns to the directory you were just in.

cd
change directory
-
the previous directory

tree -L 2

Draws the directory structure as a tree.

tree
shows directories as a tree
-L 2
go at most 2 levels deep

Start practising

Practise the commands in your browser: learn mode explains every part, exam mode shows only the question.

Open KAGETERM All topics