Commands by jemeseen (0)

  • bash: commands not found

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 crontab entries for all the users that actually have a crontab
This is how I list the crontab for all the users on a given system that actually have a crontab. You could wrap it with a function block and place it in your .profile or .bashrc for quick access. There's prolly a simpler way to do this. Discuss.

For when GUI programs stop responding..
man xkill

Create a file of a given size in linux
If you're trying to create a sparse file, you can use dd by 'skip'ing to the last block instance. ls -ls shows the actual size vs. the reported size

Stream and copy a video from lan
Requires a listening port on HOST eg. "cat movie.mp4 | nc -l 1356 " (cat movie.mp4 | nc -l PORT) Useful if you're impatient and want to watch a movie immediately and download it at the same time without using extra bandwidth. You can't seek (it'll crash and kill the stream) but you can pause it.

Insert a line at the top of a text file without sed or awk or bash loops
Yet another way to add a line at the top a of text file with the help of the tac command (reverse cat).

Setting reserved blocks percentage to 1%
According to tune2fs manual, reserved blocks are designed to keep your system from failing when you run out of space. Its reserves space for privileged processes such as daemons (like syslogd, for ex.) and other root level processes; also the reserved space can prevent the filesystem from fragmenting as it fills up. By default this is 5% regardless of the size of the partition. http://www.ducea.com/2008/03/04/ext3-reserved-blocks-percentage/

reset an hanging terminal session
when your terminal session seems unrensponsive (this normally happen after outputting some binary data directly on your standard output) it may me saned by hitting: CTRL+J tput sgr0 CTRL+J Note: don't press the Enter key, just ctrl+j

Verify if ntpd is working properly
Used to verify if Network Time Protocol daemon is working properly.

View Owner, Group & Permissions.
#Alias alias perm="stat -c '%n %U:%G-%a'" #Function perm() { for ll in $@; do stat -c "%n %U:%G-%a" "$ll"; done; }

Sed can refference parts of the pattern in the replacement:


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: