1) `pgrep` is a standard utility that does what his `psgrep` does and much much more. 2) htop is a cpu and memory hog -- every time I've used it I noticed it takes 6+% CPU time 3) there's an awk trick to do the `sort | uniq` recommendation that works on 10+GB files (single pass): awk '!x[$0]++' 4) Passwordless keys are dangerous -- use ssh-agent to save the password of the keys
Unix tricks
21–30 of 232 posts
Re: Unix tricks
#22> SMB is better than NFS. More details would be nice.
Re: Unix tricks
#23is something I use a lot - plus xargs sometimes
Re: Unix tricks
#24SMB is better than NFS in Unix Tricks? Shame Shame Shame. Possibly just wrong. Like the rest though. Thanks!
Re: Unix tricks
#25Whut? ctrl-r? How have I missed that? No more 'history|grep foo' for me!
Re: Unix tricks
#26Whut? ctrl-r? How have I missed that? No more 'history|grep foo' for me!
# Bind the up arrow to history search, instead of history step
"\e[A": history-search-backward
"\e[B": history-search-forward
No more "^rls" to search for ls in your bash history; just type "ls" and start hitting the up arrow.Re: Unix tricks
#27Re: Unix tricks
#28Re: Unix tricks
#29So happy to see this on HN! Actually I took most of the tips from unix threads here and r/commandline, I highly recommend that subreddit if you like this kind of tricks! Edit: also, @climagic: https://twitter.com/climagic Second edit: I'm enhancing the file with these comments, so if there are any inconsistencies between the txt and a commenter, it's my fault.
Re: Unix tricks
#30> SMB is better than NFS. More details would be nice.
I've found NFS to use much less cpu than SMB (on raspberry pis running XBMC at least)
If you use any NAS device with a weak CPU and you have a choice of CIFS or NFS, the NFS transfer rates are normally 25% faster and the load is much less on the server.