"*" is important if you don't know exact name of file. Check it out and you'll see
Corrected.
There's already a proper command for what the former alternative tried to script
Add an alias to your .bashrc that allows you to issue the command xkcd to view (with gwenview) the newest xkcd comic... I know there are thousands of them out there but this one is at least replete with installer and also uses a more concise syntax... plus, gwenview shows you the downloading progress as it downloads the comic and gives you a more full featured viewing experience.
For those of us that still uses lynx :)
Sometimes I need to move several blank lines my terminal, I usually use this command, does anybody know a better one? Thanks
uses the -u switch for UTC
Another way could be
echo $(($(date -ud "00:29:36" +%s)%86400))
Sometimes "ls" is just too slow, especially if you're having problems with terminal scroll speed, or if you're a speed freak. In these situations, do an echo * in the current directory to immediately see the directory listing. Do an echo * | tr ' ' '\n' if you want a column. Do an alias ls='echo *' if you want to achieve higher echelons of speed and wonder. Note that echo * is also useful on systems that are so low in memory that "ls" itself is failing - perhaps due to a memory leak that you're trying to debug.
Best way I know to get rid of .bash_history and don't allow bash to save the current one on exit Edit: added ~/ before .bash_history, just in case... ;)
Select a file/folder at random. Show Sample Output
grep '^[^#]' sample.conf \__/ |||| \_________/ | |||| | | |||| \- Filename | |||| | |||\- Only character in group is '#' | ||| | ||\- Negate character group (will match any cahracter *not* in the | || group) | || | |\- Start new character group (will match any character in the | | group) | | | \- Match beginning of line | \- Run grep Empty lines will also be not matched, because there has to be at least one non-hash-sign character in the line. Show Sample Output
Remove your BASH history and then link it to /dev/null
Shows the status of SElinux. -- fir3net.com -- Show Sample Output
sudo gedit /etc/default/grub This would open the Grub configuration file. In this file we have to edit the line GRUB_CMDLINE_LINUX="" to GRUB_CMDLINE_LINUX="acpi_backlight=vendor"
Do stuff with each file in a directory.
Tail is much faster than sed, awk because it doesn't check for regular expressions. Show Sample Output
convert your text to ascii art Show Sample Output
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.
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
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: