Last active
September 2, 2015 08:52
-
-
Save ivalentinee/08391a796d1b9e7f0e9c to your computer and use it in GitHub Desktop.
playing with grep/sed/tail/etc...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# most hungry processes (no, htop is too mainstream) | |
ps aux --sort -rss | head -n 10 | sed 's/[^ ]* *[0-9]* *\([0-9\.]*\) *\([0-9\.]*\) *[0-9]* *[0-9]* *? *[SsLl]* *[^ ]* *[^ ]* *\([^ ]*\).*/processor: \1%, memory: \2%, process: \3/' | |
# fix unzipped files with russian names in current directory | |
find . -type f -exec sh -c 'np=`echo {}|iconv -f cp1252 -t cp850| iconv -f cp866`; mv "{}" "$np"' \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment