Skip to content

Linux commands

Peter Ajtai edited this page Feb 7, 2014 · 49 revisions
  • Running multiple commands
    • Both attempted, even if first one has error
      • [Command1]; [Command2];
    • Use short circuiting - [Command] will only happen if [Test] succeeds
      • [Test] && [Command]

ifconfig

killall

lscpu

ping

ps for processes

  • often top is more useful

sed

  • search replaces in stream (e.g. file)
  • to have it act on a string, pipe it
echo "i do not like spaces"|sed 's/ /_/g'

source

* Update `.bash_profile` without a restart
* `source .bash_profile`

traceroute

wget

# get urls from a file
wget -i filename.ext

zip

zip command will update a file in a zip archive if used with an existing archive -m option will delete the files after putting them in the archive (suggested to use with -T)

Linked from:

Linux

Total of 183 pages.
Total of 67 pages not in main tree.
Total of 147 nodes.
This Sidebar and the "Linked From" sections created by Wiki Buddy
The full tree is at _WB-Full-Tree

Clone this wiki locally