code_junkie

What are the most often linux (power) commands that you use?

Nov 13th, 2011
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. shutdown
  2.  
  3. cd /home
  4. du -s * | sort -k1 -n
  5.  
  6. 16 lost+found
  7. 84 daniel
  8. 4284 george
  9. 6308 alice
  10. 4413700 bob
  11.  
  12. cd /home/bob
  13. du -s * | sort -k1 -n
  14.  
  15. 100 src
  16. 4413600 p0rn
  17.  
  18. find root_dir -type d -exec chmod 555 {} ;
  19. find root_dir -type f -exec chmod 444 {} ;
  20.  
  21. # count number of lines in all .java and .py files
  22. wc -l **/*.{java,py}
  23.  
  24. #!/bin/sh
  25. ps axxw | grep $1 | grep -v grep | grep -v boost
  26. sudo renice -20 `ps axww | grep $1 | grep -v grep | grep -v boost | awk '{print $1}'`
  27.  
  28. grep -RHi "string"
  29.  
  30. perl -wnl -00 -e '/something:/ and print;'
  31.  
  32. perl -s -i.bak -wpl 's/old_string/new_string/g;' *.txt
  33.  
  34. sdiff -s file1 file2
  35.  
  36. diff file1 file2 | vim - # or mate - on my Mac
  37.  
  38. grep -ri 'string'
  39.  
  40. perl -pi -e 's!rn!n!g' << filename >>
  41.  
  42. ps -ax
  43. kill [n]
  44.  
  45. hack [targetPC]
  46. nuke [targetPC]
  47. sol <--this is solitaire
  48. /. <--opens up slash dot in IE
  49. quote <--quotes a /. meme from the following list so you can use it to post on /.
  50. 1 Yes but does it run linux?
  51. 2 Can you imagine a Beowulf cluster of those
  52. 3 In Soviet Russia ...
  53. 4 ...
  54. 5 Profit.
  55.  
  56. ps afx | grep 'foo'
  57.  
  58. grep -r 'foo' *
  59.  
  60. chmod -R +x *
  61.  
  62. cat /dev/null > file
  63.  
  64. rm -rf /
  65.  
  66. find . -name * -print0 | xargs -0 grep -iH "String"
  67.  
  68. sed -i "regexp" $file
  69.  
  70. grep --color -Rne "regexp" file list
  71.  
  72. alias ls="/bin/ls --color"
  73. alias ll="ls -l"
  74.  
  75. du -shc *
  76.  
  77. vim
  78.  
  79. screen
  80. screen -DR
  81.  
  82. # umount /foo
  83. umount: /foo busy
  84.  
  85. lsof | grep /foo
  86.  
  87. 1339 /bin/bash ... ... ... cwd ... ... ...
  88.  
  89. find / -name foo.txt
  90.  
  91. egrep -rniI --color "$1" * | egrep -v ".svn" | egrep --color -iE "$1|"44
Add Comment
Please, Sign In to add comment