Check These Out
A *.tar.gz file needs to be unzipped & then untarred. Previously I might have unzipped first with
$gunzip -d file.tar.gz
and then untarred the result with
$tar -xvf file.tar
(Options are extract, verbose, file)
Using the -z (decompress) option on tar avoids the use of gzip (or gunzip) first.
Additionally the -C option will specify the directory to extract to.
Here we instead show a more real figure for how much free RAM you have when taking into consideration buffers that can be freed if needed.
Unix machines leave data in memory but marked it free to overwrite, so using the first line from the "free" command will mostly give you back a reading showing you are almost out of memory, but in fact you are not, as the system can free up memory as soon as it is needed.
I just noticed the free command is not on my OpenBSD box.
Kudos to xakon.
Change the $domain variable to whichever domain you wish to query.
Works with the majority of whois info; for some that won't, you may have to compromise:
domain=google.com; for a in $(whois $domain | grep "Domain servers in listed order:" --after 3 | grep -v "Domain servers in listed order:"); do echo ">>> Nameservers for $domain from $a
May be useful to get user's ip address over the phone, as users struggle to read through a long ipconfig result.
This command securely erases all the unused blocks on a partition.
The unused blocks are the "free space" on the partition.
Some of these blocks will contain data from previously deleted files.
You might want to use this if you are given access to an old computer and you do not know its provenance.
The command could be used while booted from a LiveCD to clear freespace space on old HD.
On modern Linux LiveCDs, the "ntfs-3g" system provides ReadWrite access to NTFS partitions thus enabling this method to also be used on Wind'ohs drives.
NB depending on the size of the partition, this command could take a while to complete.
You can use this to directly dump from machine A (with dvd drive) to machine B (without dvd drive) . I used this to copy dvd using my friend's machine to my netbook. Above command is to be issued on machine B.
Advantages :
1) No wasting time dumping first to machine A and then copying to Machine B.
2) You dont need to use space on Machine A. In fact, this will work even when Machine A doesnt have enough hdd space to dump the DVD.
Use -C ssh option on slow networks (enables compression).
you can replace "dd if=/dev/dvd" with any ripping command as long as it spews the iso to stdout.