Show Menu
Cheatography

Linux Commands Cheat Sheet (DRAFT) by

Sheet for CITC 1332 VMs: Fedora Linux,

This is a draft cheat sheet. It is a work in progress and is not finished yet.

vi(m)

Command Mode
Shift + ;
vim
q!
Quit without saving
 

ls Options

-a
Long Listing
-R
Recursive list
-r
Reverse order
-t
Sort by last modified
-S
Sort by file size
-l
Long listing format
-1
One file per line
-m
Comma-­sep­arated output
-Q
Quoted output

Search Files

grep
pattern files
Search pattern in files
grep -i
Case insens­itive search
grep -r
Recursive search
grep -v
Inverted search
grep -o
Show matched part of file only
find
/dir -name name*
Find files starting with name in dir
find
/dir/ -user name
Find files owned by name in dir
find
/dir/ -mmin num
Find files modifed less than num minutes ago in dir
whereis
command
Find binary / source / manual for command
locate
file
Find file (quick search of index)