Commands tagged date (119)

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

print offsets of file disk for losetup/loop-mount
If you want to mount partitions of an disk image, you need the offsets and sizes of the partitions. This command prints them in the format that losetup understands.

Export unpushed files list

find files ignoring .svn and its decendents

Add strikethrough to text

Ensure that each machine that you log in to has its own history file
On systems where your home directory is shared across different machines, your bash history will be global, rather than being a separate history per machine. This setting in your .bashrc file will ensure that each machine has its own history file.

Allow any local (non-network) connection to running X server

Prepend a text to a file.
Prepend text to a file. It doen't need temporary files, ed or sed.

Use top to monitor only all processes with the same name fragment 'foo'
Like command 10870, but no need for sed

Make a directory named with the current date
Create a directory named with the current date in ISO 8601 format (yyyy-mm-dd). Useful for storing backups by date. The --iso switch may only work with GNU date, can use format string argument for other date versions.

easily find megabyte eating files or directories
sorts the files by integer megabytes, which should be enough to (interactively) find the space wasters. Now you can $ dush for the above output, $ dush -n 3 for only the 3 biggest files and so on. It's always a good idea to have this line in your .profile or .bashrc


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: