6 ms·
A great list of command-line tips
- automatedsqa 15y agoNeat and clean design - Liked the selection tool. I wish HN provides the same.
- hashfold 15y agoloved all the commands...specially "python -m SimpleHTTPServer"
- minikomi 15y agoalias pyserv="python -m SimpleHTTPServer"
- stevengg 15y agoanother great list http://www.reddit.com/r/linux/comments/mi80x/give_me_that_one_command_you_wish_you_knew_years/ http://www.reddit.com/r/linux/comments/mi80x/give_me_that_on...
- mise 15y agoThis is a related commandline script that allows you to search commandlinefu.com https://github.com/samirahmed/fu https://github.com/samirahmed/fu
- vog 15y ago> 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 15y agoAnd 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.
- moe 15y agoI have these in my .zshrc: autoload edit-command-line zle -N edit-command-line bindkey '^X^E' edit-command-line
- e40 15y agoctrl-x ctrl-e ... the e isn't naked as you suggested.
- joelthelion 15y agoNo love for autojump? (https://github.com/joelthelion/autojump/wiki https://github.com/joelthelion/autojump/wiki)
- secoif 15y agoI 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.
- qwertyboy 15y agoAutojump rocks! Currently I am using [fasd](https://github.com/clvv/fasd https://github.com/clvv/fasd), which is inspired by Autojump but works for stuff other than cd.
- burke 15y agoI'm using rupa/j. This looks way featureful. Thanks for the link!
- K2h 15y agoOn 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).aspx http://technet.microsoft.com/en-us/library/cc772390(v=ws.10)...
- Aethaeryn 15y agoThis 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 15y agoI 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.
- deleted 15y ago[deleted]
- bostonvaulter2 15y agomtr is pretty awesome though, you should install it and give it a try.
- dfc 15y agoYawn.
- avar 15y agoThe #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 15y agoIn 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 http://www.bigsmoke.us/readline/shortcuts
- avar 15y agoThanks. 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 15y agoI'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.
- oinksoft 15y agoI have one cheat sheet at my desk, and it is this one.
- dionidium 15y agoset -o vi
- gaving 15y agoI love my vim, but yuck on the shell.
- kordless 15y agoUse this to help remember them: alias fu='curl -s http://www.commandlinefu.com/commands/browse/sort-by-votes/plaintext 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!