CentOS: File Operations Cheat Sheet

catPrint a file on the screen, concat­enate files
touchCreate an empty file, change file timestamps
cpCopy direct­ories or files
mvMoves direct­ories or files
rmRemoves direct­ories or files (This is how you remove recurs­ively)
lnCreates a symbolic or hard link for a file
lessView a file on page at a time, allows for going backwards
headPrint the first 10 lines of a file
tailPrint the last 10 lines of a file
wcCount the number of words or characters in a file
statDisplay file of file system status
cutRemove sections from lines of input
pasteMerge lines of files

Leave a Reply

Your email address will not be published. Required fields are marked *