Skip to content

Instantly share code, notes, and snippets.

@AaronPhalen
Last active October 18, 2015 18:38
Show Gist options
  • Save AaronPhalen/f20091d8dc73338f5ea6 to your computer and use it in GitHub Desktop.
Save AaronPhalen/f20091d8dc73338f5ea6 to your computer and use it in GitHub Desktop.
Useful Ubuntu 12.04 terminal commands.
Author: Aaron Phalen | Twitter: @aaron_phalen | Email: [email protected]
Motivation: As an engineer embarks on server related assignments or system
administrative tasks, a few rudimentary UNIX commands can broaden an engineer's
breadth of knowledge and increase work productivity ouput.
1) man <command> --> manual or documentation for particular command.
2) find . -name "sample.txt" --> Search the current directory for a file named sample.txt.
3) find / -name "sample.txt" --> Similar to one, search the root file sytem for a file named sample.txt.
4) find . -name "sample" -type d --> Search the current directory for a directory named sample.
5) find / -name "sample" -type d --> Similarly, search the root directory for a directory named sample.
6) cd - --> Returns user to prior directory.
7) history --> displays history of N number of files, as specified in .bashrc.
8) ctrl + R <history-search>
9) sudo !! or !! --> repeats last command in history.
10) ls -d <dirname> */ --> list subdirectory of "dirname" directory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment