

A great list of command-line tips - shocks
http://www.commandlinefu.com/commands/browse/sort-by-votes/

======
avar
The #1 thing that'll improve most people's workflow is learning how to use
readline effectively. I'm continually amazed by how many people who use shells
daily use the arrow keys to navigate around, don't know about common things
like C-r to reverse-search through history and other commands that make
editing on the command-line a breeze.

~~~
thirdhaf
In aid of helping others along this path, here's a crib sheet I've found for
readline shortcuts. I've been meaning to become more efficient in using bash
and this might just be the push I need.
<http://www.bigsmoke.us/readline/shortcuts>

~~~
avar
Thanks. That's an excellent reference. I've been pointing people towards the
relevant section in the readline or bash manuals, but this is much better.

~~~
thirdhaf
I've honestly tried to use the man pages for bash before, they are unarguably
complete but unfortunately difficult to get started with. The chances of me
knowing ahead of time to either search first for "readline" followed "Commands
for Moving" or read the full man page until I get to line 2957 is slim.

------
vog
_> Next time you are using your shell, try typing ctrl-x e [...]. The shell
will take what you've written on the command line thus far and paste it into
the editor specified by $EDITOR._

I'm astonished this works in bash but not in zsh.

~~~
read_wharf
And if you use set -o vi in .bashrc, or set editing-mode vi in .inputrc, then
'v' will do the same thing, e.g.

    
    
        $ blah blah[ESC]v
    

puts you in vim with the command line thus far.

~~~
e40
I tried "set -o vi" and every v sent me into the editor. This was on the
latest cygwin.

~~~
jlebar
Well, you must have been command mode. Try pressing "i".

------
Aethaeryn
This is _almost_ a useful resource, but there are many bashisms on the list!
Its utility is kind of limited for those of us who use a different shell when
they don't have some sort of standardized "this only works in bash" warning.

~~~
chimeracoder
I have the opposite complaint: I'm using bash, but thinks like mtr aren't part
of coreutils, so I think of them as just separate programs that happen to work
at the command-line. I could just as easily list ttyter as a command-line
'tool' for tweeting from the command line.

I don't really have a solution to this, because at the end of the day, the
goal is to do more things at the command line, but it'd be nice to have a way
to distinguish between features of the shell, features of the OS, and non-OS
programs that have command-line interfaces. Even if I'm interested in all
three, it's nice to know that 'sudo !!' can be expected to work machines than
mtr, for example.

~~~
bostonvaulter2
mtr is pretty awesome though, you should install it and give it a try.

------
joelthelion
No love for autojump? (<https://github.com/joelthelion/autojump/wiki>)

~~~
qwertyboy
Autojump rocks! Currently I am using [fasd](<https://github.com/clvv/fasd>),
which is inspired by Autojump but works for stuff other than cd.

~~~
burke
I'm using rupa/j. This looks way featureful. Thanks for the link!

------
K2h
On win7 I found forfiles command the other day that allows me to do a dir with
a date restriction. By using the > redirect to output to file I got a list of
files that changed in a certain time.

[http://technet.microsoft.com/en-
us/library/cc772390(v=ws.10)...](http://technet.microsoft.com/en-
us/library/cc772390\(v=ws.10\).aspx)

------
stevengg
another great list
[http://www.reddit.com/r/linux/comments/mi80x/give_me_that_on...](http://www.reddit.com/r/linux/comments/mi80x/give_me_that_one_command_you_wish_you_knew_years/)

------
mise
This is a related commandline script that allows you to search
commandlinefu.com

<https://github.com/samirahmed/fu>

------
kordless
Use this to help remember them: alias fu='curl -s
[http://www.commandlinefu.com/commands/browse/sort-by-
votes/p...](http://www.commandlinefu.com/commands/browse/sort-by-
votes/plaintext) | grep -vE "^$|^#"'

Put it in your .bash_profile file in your home directory on OSX, or your
.bashrc file on Linux.

Simply type 'fu' on the command line to jog your memory!

------
hashfold
loved all the commands...specially "python -m SimpleHTTPServer"

~~~
minikomi
alias pyserv="python -m SimpleHTTPServer"

------
dfc
Yawn.

