| Command | Description |
|---|---|
ls |
Lists files and directories in the current directory. Use ls -l for long listing format. |
cd <dir> |
Changes the current directory to <dir>. |
pwd |
Prints the current working directory. |
mkdir <dir> |
Creates a new directory named <dir>. |
rmdir <dir> |
Removes an empty directory named <dir>. |
rm -r <dir> |
Removes a directory and its contents recursively. |
rm <file> |
Deletes a file. Use rm -f to force delete without confirmation. |
touch <file> |
Creates a new, empty file or updates the timestamp of an existing file. |
cp <src> <dest> |
Copies files or directories. Use cp -r to copy directories. |
mv <src> <dest> |
Moves or renames files or directories. |
find <path> -name <filename> |
Searches for files and directories by name under the given path. |
tree |
Displays directory structure in a tree-like format. (Needs to be installed.) |