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/
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.
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.
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:
Find out the earliest installation time of a linux system by getting the / filesystem creation time. This example is only valid the os is installed on an ext2/3/4 filesystem.
This command changes the reserved space for privileged process on '/dev/sda' to 1 per cent.
the result of the command helped a check the Maximum file size and Maximum file system size.
Block size; MAX File size; Maximum file system size
1 KiB; 16 GiB ; 2 TiB
2 KiB ; 256 GiB ; 8 TiB
4 KiB ; 2 TiB ; 16 TiB
8 KiB[limits 1]; 2 TiB; 32 TiB
Does what summary says
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.
Before doing this, back-up all data on any ext3 partitions that are to be converted to ext4.
After running previous command you MUST run fsck, is needed to return the filesystem to a consistent state.
fsck -pDf /dev/yourpartition
Edit /etc/fstab and change the 'type' from ext3 to ext4 for any partitions that are converted to ext4.
Very useful set of commands to know when your file system was created.