Commands tagged sed (376)

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands


Check These Out

split a string (3)

Speed up upgrades for a debian/ubuntu based system.
Please install aria2c before you try the above command. On ubuntu the command to install aria2c would be: $sudo aptitude install aria2

List only directories, one per line
Alternatively, $ ls -F | grep /\$ but will break on directories containing newlines. Or the safe, POSIX sh way (but will miss dotfiles): $ for i in *; do test -d "./$i" && printf "%s\n" "$i"; done

Makes the permissions of file2 the same as file1
Also works with: $chgrp --reference file1 file2 $chown --reference file1 file2

Show git log beautifully
Only show a short of important information inline ( include branch info ), and color this log tree.

List bash functions defined in .bash_profile or .bashrc
typeset command gives to stdout all the functions defined in a bash session, -f and -F switches are for: all functions names with body (-f) and all functions names only (-F).

HTTP redirect
any HTTP requests to the machine on the specified port will be redirected to http://www.whatevs.com... quick, dirty, works fine for sites w/

disassemble binary shellcode
The options -b binary and -m are needed for disassembling raw machine code when it is not part of a full binary executable with proper headers.

List only the directories
-d: list directory entries instead of contents, and do not dereference symbolic links

Shell recorder with replay
If you provide the option -t to the script command and redirect stderr into a file, the timing information on what is going on on the terminal, is also stored. You can replay the session via the scriptreplay command, where you can also provide a speedup factor (see the man page for details). Great for demonstration purposes ...


Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: