Published on

Useful Linux commands cheatsheet

Authors
  • avatar
    Name
    Chris Postma
    Twitter
CommandDescription
lsList files in current directory
catConcatenate files and print on the standard output
split -l 1000 file.txtSplit file.txt into multiple files of 1000 lines each
grepSearch for a pattern in a file
head -n 10Print the first 10 lines of a file
tail -n 10Print the last 10 lines of a file
wc -lCount the number of lines in a file
word countCount the number of words in a file
cd -Go to previous directory
ctrl + R <command>Search for past uses of command; enter move to next
history | grep <command>Search for past uses of command; can pipe into tail