Skip to content

Instantly share code, notes, and snippets.

@andykuszyk
Last active July 6, 2017 15:48
Show Gist options
  • Save andykuszyk/e32f10a6ad4683bdd2aebb20e5850ff7 to your computer and use it in GitHub Desktop.
Save andykuszyk/e32f10a6ad4683bdd2aebb20e5850ff7 to your computer and use it in GitHub Desktop.
linux commands

See devices on local network

arp-scan --localnet

Check disk usage

du -h

Finding text in files

cat /path/to/file.txt | grep -o -P '.{0,3}string-to-match.{0,10}'

See first few lines in file

head /path/to/file.txt

List all processes, ordered by name

ps -A --sort cmd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment