Check These Out
tar doesn't support wildcard for unpacking (so you can't use tar -xf *.tar) and it's shorter and simpler than
for i in *.tar;do tar -xf $i;done (or even 'for i in *.tar;tar -xf $i' in case of zsh)
-i says tar not to stop after first file (EOF)
Replace 60 with the number of minutes until you want the machine to shut down.
Alternatively give an absolute time in the format hh:mm (shutdown -h 9:30)
Or shutdown right away (shutdown -h now)
There are two ways to use "here documents" with bash to fill stdin:
The following example shows use with the "bc" command.
a) Using a delimiter at the end of data:
$ less-than less-than eeooff bc
> k=1024
> m=k*k
> g=k*m
> g
> eeooff
1073741824
b) using the "inline" verion with three less-than symbols:
$ less-than less-than less-than "k=1024; m=k*k; g=k*m; g" bc
1073741824
One nice advantage of using the triple less-than version is that the command can easily be recalled
from command line history and re-executed.
PS: in this "description", I had to use the name "less-than" to represent the less-than symbol because the commandlinefu input text box seems to eat up the real less-than symbols. Odd.
Scans local area for visible Bluetooth devices. Use 'hcitool inq' to discover the type of device it is. And use -i hciX option to specify the local Bluetooth device to use.
It's also possible to delay the extraction (echo "unrar e ... fi" |at now+20 minutes) wich is really convenient!
sudo ipfw pipe 1 config bw 50KByte/s
Set the bandwidth (bw) limit to any number you want. For example you could have a 15kb pipe for X application and then a 100kb pipe for another application and attach things to those pipes. If a port isn’t attached to a pipe, it runs at full speed. Change the number (in this case 1) to a different number for a different pipe.
The next step is to attach your port.
sudo ipfw add 1 pipe 1 src-port 80
In this case anything on port 80 (http) will be set to a limit of 50Kbyte/s. If you want to attach a second port to this pipe, repeat the command but change the port number at the end.
src : http://www.mactricksandtips.com/2008/12/throttling-bandwidth-on-a-mac.html
* Add comment with # in your command
* Later you can search that command on that comment with CTRL+R
In the title command, you could search it later by invoking the command search tool by first typing CTRL+R and then typing "revert"
This command compares file2 with file1 and removes the lines that are in file1 from file2. Handy if you have a file where file1 was the origional and you want to remove the origional data from your file2.
See man vmstat for information about the statistics.
This does the same thing without the timestamp:
$vmstat 5