commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
List all files in a directory in reverse order by modified timestamp. When piped through tail the user will see the most recent file name.
Just waste some resources in a philosophical way
I make an extensive use of sudo, so I had to exclude the sudo part of the command history
ok I'm sure it's not pretty
Change HH:MM with your target time.
This is for a Debian/Ubuntu GNU system. You need bash (package bash), date (package coreutils) and toilet (package toilet). Install with:
# apt-get install bash coreutils toilet toilet-fonts
For a python project, sometimes I need to clean all the compiled python files. I have an alias 'rmpyc' to this command. This really saves me a lot of typing and hunting throughout the folders to delete those files.
this command searches for a keyword or an expression in a path and avoids versionned files
Enable 'sleep' function in Windows environment where this does not exist, although not exact in time. (there is a delay for each ping) This is a simple way to separate commands with a time-period.
A simple command to find the total number of subdirectories in current directory starting with specific name.
A different approach to the problem - maintain a small sorted list, print the largest as we go, then the top 10 at the end. I often find that the find and sort take a long time, and the large file might appear near the start of the find. By printing as we go, I get better feedback. The sort used in this will be much slower on perls older than 5.8.
The nl command lists the contents of a file where is each line is prefixed by a line number. For more information about this command, check out its man page. I tested under Mac OS X and Xubuntu 9.04
Restores the keyboard so your partner who expects the keys to correspond to what they're labelled can type (in qwerty).
The description of how the one-liner works is here at my blog:
If you don't save the rule set it won't be applied during a reboot
Convert text from lowercase to uppercase
The better alternative to #9756.
I don't think I'd ever use the original command, but this one was so bad I had to post this. Sorry.
1. $(ls) is dumb, and will give errors if you have an alias like "ls -Fs"
2. clear is better and more portable than reset state.
3. if you're interested in differences, then use diff, not cat.
mounts a samba share on a remote machine using a credentials file that can be in a file tht is not accessable by other users the file will look like:
best option i belive