alias easy_search="curl -s http://pypi.python.org/simple/ | perl -ne 'print if s/]+>//g && $.>1'|grep"
Favorite Unix Commands
101–110 of 135 posts
Re: Favorite Unix Commands
#102Re: Favorite Unix Commands
#103 | sort | uniq -c | sort -n -r | head
to get a nice top 10 whatevers in the whoositRe: Favorite Unix Commands
#104Earlier quoted context omitted.
I don't find this one useful. [up-arrow] automatically inserts the last command, which gives a generic mechanism to correct the command and it requires no more typing than !!: [up-arrow][control-a]sudo [enter]
moving your hand over to arrow keys is why I would use the sudo !! version.
Re: Favorite Unix Commands
#105I've been using this for a while, and trust me, its changed my command line workflow, and I wish, this should come as inbuilt for all POSIX shells!
Here is how it works -
If you use your shell to navigate and launch applications, fasd can help you do it more efficiently. With fasd, you can open files regardless of which directory you are in. Just with a few key strings, fasd can find a "frecent" file or directory and open it with command you specify. Below are some hypothetical situations, where you can type in the command on the left and fasd will "expand" your command into the right side. Pretty magic, huh?
v def conf => vim /some/awkward/path/to/type/default.conf
j abc => cd /hell/of/a/awkward/path/to/get/to/abcdef
m movie => mplayer /whatever/whatever/whatever/awesome_movie.mp4
o eng paper => xdg-open /you/dont/remember/where/english_paper.pdf
vim `f rc lo` => vim /etc/rc.local
vim `f rc conf` => vim /etc/rc.conf
Fasd offers quick access to files and directories for POSIX shells. It is inspired by tools like autojump, z and v. Fasd keeps track of files and directories you have accessed, so that you can quickly reference them in the command line.The name fasd comes from the default suggested aliases f(files), a(files/directories), s(show/search/select), d(directories).
Fasd ranks files and directories by "frecency," that is, by both "frequency" and "recency." The term "frecency" was first coined by Mozilla and used in Firefox.
Here is the Link - https://github.com/clvv/fasd
Re: Favorite Unix Commands
#106Earlier quoted context omitted.
Or even 'ag' (the silver searcher). Like ack, but "better". https://github.com/ggreer/the_silver_searcher
"better" or just faster since its written in C ? It is not a drop-in replacement for ack. e.g. there are some basic usages it does not support -- iirc counts (ag -c pattern).
Re: Favorite Unix Commands
#107I have never understood the love for `sudo !!`. I think `ctrl+pa sudo ` is faster, explicit, and more versatile.
Re: Favorite Unix Commands
#108alias unbz2='tar xvjf' alias untar='tar xvfz'
Re: Favorite Unix Commands
#109I like those un- commands for easier archive extracting, e.g.: alias unbz2='tar xvjf' alias untar='tar xvfz'
When creating the archive, you still have to use your favorite compression method (XZ aka LZMA, activated with J is even better, but slightly slower, than bzip).
Re: Favorite Unix Commands
#110grep -r . "some random debug message" (searches for the passage recursively in all files from the directory it was executed, the main reason I like developing in linux more than windows)
grep -rs
or (more commonly for me):- grep -rsi
(The -s supresses errors about unreadable files that may clutter the output. -i for case insensitivity.)