ubuntu Cheat Sheet

A Software › Linux cheat sheet in English by [deleted]

Quick reference

10,677 views 2,655 downloads 20 Jan 2015 History
3.1 avg · 1 rating

Word Count (wc)

Options:
-l lines
-m char count
-c byte count
-w word count
Example:
ls | wc -l

find with grep

Options:
-iname file name
-type file(f) or direct­ory(d)
-exec pass file found to next command
‘{}’ - file name
‘;’ - Terminate
Example:
find office­bas­e/p­oint/ -iname '­*.c­pp' -exec grep DOMObject '­{}' -A 1 -B 1 --colo­r=a­lways '­;'

Disk Usage (du)

Options:
-s Shows Summary
-h Human readable units
--exclude excludes the files in calcul­ation
Example:
du -sh --excl­ude­=”*.jar”

Free Memory (free)

Options:
-h Human readable units
Example:
free -h

Command line activity monitor (top)

Options:
Enter command
After that
u - select user
k - Kill a process (PID will be prompted)
q - quit
Example:
top

Screen Multip­lexer

Options:
tmux new -s <Se­ssion Name>
tmux ls - List all sessions
tmux a -t <Se­ssion Name to resume>
ctrl b + [ - then scroll, q to exit scroll
ctrl b + % “ - split window in horizontal and vertical panes
ctrl b + p , n - switch to previous and next window
ctrl b + o - switch across panes
Example:
tmux new -s runTests

Badges

Good Cheat Sheet Nice Cheat Sheet Downloaded from Unusual Locations × 2

Comments

No comments yet.

Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.