Hide

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again.

Delete that bloated snippets file you've been using and share your personal repository with the world. 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.


If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/

Get involved!

You can sign-in using OpenID credentials, or register a traditional username and password.

First-time OpenID users will be automatically assigned a username which can be changed after signing in.

Hide

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:

Hide

News

2012-05-20 - test
test
2012-05-20 - test
test
2012-05-20 - test
test
2012-05-20 - Test tweets
YU not working?
Hide

Tags

Hide

Functions

Commands by bbelt16ag

Commands by bbelt16ag from sorted by
Terminal - Commands by bbelt16ag - 10 results
# umount /media/filesystem; e2fsck -f /dev/device ; resize2fs -p /dev/device 200G #actual newsize#;lvreduce --size 200G /dev/device; mount /media/filesystem; df -h /media/filesystem
2011-09-14 08:52:02
User: bbelt16ag
1

Just the commands for the lvreduce I keep forgetting.

e2fsck -C -v /dev/device
2011-04-08 05:33:39
User: bbelt16ag
Functions: e2fsck
2

if you happen to start with out the -C switch then you a killall -USR1 e2fsck

blockdev --getsize64 /dev/sd[ab]
2011-01-08 11:25:54
User: bbelt16ag
Tags: blockdev
0

Compare the disk space for the new and old drive

dd if=/dev/sda of=/home/sam/MBR.image bs=512 count=1
2011-01-08 11:25:02
User: bbelt16ag
Functions: dd
Tags: dd ddrescue
1

Step#2 Create a copy of the bootload and partition table!

ddrescue -n /dev/old_disk /dev/new_disk rescued.log
ddrescue -r 1 /dev/old_disk /dev/new_disk rescued.log
wget -r --wait=5 --quota=5000m --tries=3 --directory-prefix=/home/erin/Documents/erins_webpages --limit-rate=20k --level=1 -k -p -erobots=off -np -N --exclude-domains=del.icio.us,doubleclick.net -F -i ./delicious-20090629.htm
2009-07-02 01:46:21
User: bbelt16ag
Functions: wget
-1

just a alternative using a saved html file of all of my bookmarks. works well although it takes awhile.

wget -H -r -nv --level=1 -k -p -erobots=off -np -N --exclude-domains=del.icio.us,doubleclick.net --exclude-directories=
cat -n $file | tail -n 100 && head -n number-of-lines-you-want-to-keep > newfile
2009-02-15 01:02:10
User: bbelt16ag
Functions: cat head tail
-1

tells you the number of lines in said file, and then tail the last 100 lines ( or how many are messed up) then u take the total amount of lines and then subract the 100 or so lines u DONT WANT, then do a head -n $new_number and then redirect it to new file.db

watch "df | grep /this/folder/"