Show Menu
Cheatography

ubuntu Cheat Sheet by [deleted]

Quick reference

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 '*.cpp' -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
   
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Linux Command Line Cheat Sheet
          tmux the terminal multiplexer Cheat Sheet
          Windows Terminal Cheat Sheet