pwdUseful for confirming your current location before running destructive commands.
High-value Linux filesystem commands for navigating, listing, inspecting, copying, moving, linking, and organizing files and directories.
List files, inspect metadata, and understand what is in a directory.
ls -lahls -lttree -L 2stat path/to/filefile path/to/fileCreate directory trees and remove them safely.
mkdir -p app/data/uploadsrmdir empty-dirrm -rf old-buildPowerful and destructive. Verify the path first.
Common file and directory manipulation commands.
Copy directory trees while preserving timestamps and mode when possible.
cp -a source-dir target-dircp -i source.txt dest.txtmv old-name.txt new-name.txtmv logs /var/archive/logsinstall -m 755 script.sh /usr/local/bin/scriptCreate and inspect hard links and symlinks.
ln original.txt alias.txtln -s /opt/app/current app-currentreadlink app-currentrealpath ./app-current/../configUnderstand file and directory sizes.
du -sh /var/logdu -h --max-depth=1 .df -hfind . -type f -printf '%s %p
' | sort -nr | head -20