File management
Summary
This note is a quick reference for basic file and directory handling in the shell.
Commands
mkdir <folder name>→ create directorytouch file.txt→ create empty filecp file.txt backup.txt→ copy filemv file.txt archive/→ move file or renamerm file.txt→ remove file
Example usage
mkdir notes
touch notes/todo.txt
cp notes/todo.txt notes/todo.bak
mv notes/todo.bak notes/archive.txt
rm notes/archive.txtNotes
- these are the small commands you use constantly when building lab structure, copying configs, or cleaning up files
rmis safe in a lab only when you are sure about the current path and target
Related
- Back to Linux Reference
- Navigation — cd, pwd, ls
- Symlink — symbolic links and path behaviour
- [Viewing content](Viewing content) — cat, less, head, tail