Check These Out
This command is useful when you want to know what process is responsible for a certain GUI application and what command you need to issue to launch it in terminal.
This combines the above two command into one. Note that you can leave off the last two commands and simply run the command as
"find /home/ -type f -exec du {} \; 2>/dev/null | sort -n | tail -n 10"
The last two commands above just convert the output into human readable format.
This is a cool trick to view the contents of the file on /dev/pts/0 (or whatever terminal you're using), and also send the contents of that file to another program by way of an unnamed pipe. All the while, you've not bothered saving any extra data to disk, like you might be tempted to do with sed or grep to filter output.
I modify 4077 and marssi commandline to simplify it and skip an error when parsing the first line of lsmod (4077). Also, it's more concise and small now. I skip using xargs ( not required here ). This is only for GNU sed.
For thoses without GNU sed, use that :
$ modinfo $(lsmod | awk 'NR>1 {print $1}') | sed -e '/^dep/s/$/\n/g' -e '/^file/b' -e '/^desc/b' -e '/^dep/b' -e d
A null operation with the name 'comment', allowing comments to be written to HISTFILE. Prepending '#' to a command will *not* write the command to the history file, although it will be available for the current session, thus '#' is not useful for keeping track of comments past the current session.
or you can add "-x" to get a typical hexdump like output
I like the order of the arguments better this way.
..not guaranteed to always be accurate but fun to see how old you Linux installation is based on the root partitions file system creation date.
Assumes XP/2000/2003. For Server 2008+ try offset=105,906,176 You can find this number in the System Information utility under Partition Starting Offset. UEFI based boxes you want partition 2 since the first is just the boot files (and FAT). This works with (storage side) snapshots which is handy for single file restores on NFS mounted VMware systems