Commands using wget (286)

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

Find the package that installed a command

Split a file one piece at a time, when using the split command isn't an option (not enough disk space)
bs = buffer size (basically defined the size of a "unit" used by count and skip) count = the number of buffers to copy (16m * 32 = 1/2 gig) skip = (32 * 2) we are grabbing piece 3...which means 2 have already been written so skip (2 * count) i will edit this later if i can to make this all more understandable

Prettify an XML file
Like `tidy`, `xmllint` can be used to prettify XML files. The --nsclean option is also useful to remove redundant namespaces.

Read Python logs with tracebacks in color

list files recursively by size

Are the two lines anagrams?
This is just a slight alternative that wraps all of #7917 in a function that can be executed

Count Files in a Directory with Wildcards.
If the dir | wc -l Command not working.

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

cpu and memory usage top 10 under Linux
It's like `prstat -t` under Solaris

Set name of windows in tmux/byobu to hostnames of servers you're connected to
*I run this with byobu as as a custom status bar entry that runs every 10 seconds by putting it in a script here: $ .byobu/bin/10_update_windows There's no output to stdout, so nothing is displayed on the status bar. *Presumes that #{pane_title} is set to the hostname or prompt containing the host name. In my case, it's in this format: $ $USER@$HOSTNAME:$PWD The sed commands may need to be modified if your pane_title is different. *If you want to strip out a common part of a hostname, add the following before '| uniq' $ -e 's/[COMMON PART]//' I use that to strip out the domain of the servers I connect to, leaving the subdomain.


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: