ECM 1413 Linux commands Flashcards
ls
list files and directories
ls options
-l: Long format listing
-a: Include hidden files
-h: Human-readable files
cd
change directory
pwd
Print current working directory
mkdir
make new directory
rm
Remove files and directories
rm options
-r: Remove directories recursively
-f: Force removal without confirmation
cp
copy files and directories
(-r to copy recursively)
mv
move/rename files and directories
touch
create an empty file or update file timestamps
cat
view the contents of a file
head
Display the first few lines of a file
-n to specify the number of lines to display
tail
Display the last few lines of a file
-n to specify the number
ln
create links between files
-s to create a soft link (hard by default)
find
search for files and directories
-name to search by file name
-type to search by file type