News for hackers. Stuff that matters.
Re:A great list of command-line tips by avar on Sunday April 15, 2012 @03:29PM (#3844448)
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.
Re:A great list of command-line tips by thirdhaf on Sunday April 15, 2012 @03:53PM (#3844516)
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
Re:A great list of command-line tips by avar on Sunday April 15, 2012 @04:09PM (#3844573)
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.
Re:A great list of command-line tips by thirdhaf on Sunday April 15, 2012 @05:31PM (#3844838)
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.
Re:A great list of command-line tips by oinksoft on Sunday April 15, 2012 @05:17PM (#3844791)
I have one cheat sheet at my desk, and it is this one.
Re:A great list of command-line tips by sciurus on Sunday April 15, 2012 @08:11PM (#3845252)
Agreed. It's almost always worth investing time in learning your tools, and if you're like me the bash shell is your fundamental, most used tool.

I have to give Peteris Krumins credit for creating some great references like http://www.catonmat.net/blog/the-definitive-guide-to-bash-co... and http://www.catonmat.net/blog/bash-vi-editing-mode-cheat-shee... (or for the depraved, http://www.catonmat.net/blog/bash-emacs-editing-mode-cheat-s...)

Re:A great list of command-line tips by dionidium on Sunday April 15, 2012 @04:01PM (#3844545)
set -o vi
Re:A great list of command-line tips by gaving on Sunday April 15, 2012 @04:16PM (#3844595)
I love my vim, but yuck on the shell.
Re:A great list of command-line tips by vog on Sunday April 15, 2012 @09:36AM (#3843660)
> 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.

Re:A great list of command-line tips by moe on Sunday April 15, 2012 @10:20AM (#3843738)
I have these in my .zshrc:

  autoload edit-command-line
  zle -N edit-command-line
  bindkey '^X^E' edit-command-line
Re:A great list of command-line tips by read_wharf on Sunday April 15, 2012 @09:52AM (#3843680)
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.
Re:A great list of command-line tips by e40 on Sunday April 15, 2012 @10:49AM (#3843787)
I tried "set -o vi" and every v sent me into the editor. This was on the latest cygwin.
Re:A great list of command-line tips by jlebar on Sunday April 15, 2012 @05:12PM (#3844773)
Well, you must have been command mode. Try pressing "i".
Re:A great list of command-line tips by e40 on Sunday April 15, 2012 @10:38AM (#3843764)
ctrl-x ctrl-e ... the e isn't naked as you suggested.
Re:A great list of command-line tips by Aethaeryn on Sunday April 15, 2012 @01:33PM (#3844145)
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.
Re:A great list of command-line tips by chimeracoder on Sunday April 15, 2012 @01:41PM (#3844162)
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.

Re:A great list of command-line tips by bostonvaulter2 on Sunday April 15, 2012 @03:04PM (#3844358)
mtr is pretty awesome though, you should install it and give it a try.
Re:A great list of command-line tips by joelthelion on Sunday April 15, 2012 @11:28AM (#3843860)
Re:A great list of command-line tips by qwertyboy on Sunday April 15, 2012 @01:23PM (#3844125)
Autojump rocks! Currently I am using [fasd](https://github.com/clvv/fasd), which is inspired by Autojump but works for stuff other than cd.
Re:A great list of command-line tips by burke on Sunday April 15, 2012 @01:54PM (#3844194)
I'm using rupa/j. This looks way featureful. Thanks for the link!
Re:A great list of command-line tips by secoif on Sunday April 15, 2012 @12:48PM (#3844045)
I love the autojump, but it's not exactly using a built-in *nix tool like most of these are. Would love to see more people open their eyes to how awesome autojump really is. Using cd to change directories is so broken.
Re:A great list of command-line tips by K2h on Sunday April 15, 2012 @12:14PM (#3843964)
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)...

Re:A great list of command-line tips by stevengg on Sunday April 15, 2012 @07:14AM (#3843409)
Re:A great list of command-line tips by mise on Sunday April 15, 2012 @09:15AM (#3843622)
This is a related commandline script that allows you to search commandlinefu.com

https://github.com/samirahmed/fu

Re:A great list of command-line tips by kordless on Monday April 16, 2012 @01:47AM (#3846092)
Use this to help remember them: alias fu='curl -s http://www.commandlinefu.com/commands/browse/sort-by-votes/p... | 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!

Re:A great list of command-line tips by hashfold on Sunday April 15, 2012 @03:08PM (#3844375)
loved all the commands...specially "python -m SimpleHTTPServer"
Re:A great list of command-line tips by minikomi on Sunday April 15, 2012 @06:14PM (#3844955)
alias pyserv="python -m SimpleHTTPServer"
Re:A great list of command-line tips by dfc on Sunday April 15, 2012 @02:10PM (#3844226)
Yawn.