Check These Out
With -a you don't care about file type (bz2, gzip, etc.)
This script compares the modification date of /var/lib/dpkg/info/${package}.list and all the files mentioned there.
It could be wrong on noatime partitions.
Here is non-oneliner:
#!/bin/sh
package=$1;
list=/var/lib/dpkg/info/${package}.list;
inst=$(stat "$list" -c %X);
cat $list |
(
while read file; do
if [ -f "$file" ]; then
acc=$(stat "$file" -c %X);
if [ $inst -lt $acc ]; then
echo used $file
exit 0
fi;
fi;
done
exit 1
)
This command will give you a list of available keyboard shortcuts according to stty.
Lists all macros and their values defined by gcc.
Find recursively all files in ~/Notes with the extension '.md' and pipe that via xargs to rename command, which will replace every '.md' to '.txt' in this example (existing files will not be overwritten).
Give files a random name (don't ask why :-)
The function will rename files but maintain their extensions.
BUG: If a file doesn't have an extension it will end up with a dot at the end of the name.
The parameter '8' for pwgen controls the length of filenames - eight random characters.
Please check out my blog article on this for more detail. http://jdubb.net/blog/2009/08/07/monitor-wireshark-capture-real-time-on-remote-host-via-ssh/
Explanation
It creates dnsmasq-com-blackhole.conf file with one line to route all domains of com zones to 0.0.0.0
You might use "address=/home.lab/127.0.0.1" to point allpossiblesubdomains.home.lab to your localhost or some other IP in a cloud.
It searches for a specific value in the specified column and if it finds it it'll print the whole field/row. Similarly, if you don't know what you're looking for exactly but want to exclude something you're already aware of, you can exclude that "something: awk '{ if ($column != "string") print $0}'
bs = buffer size (basically defined the size of a "unit" used by count and skip)
count = the number of buffers to copy (16m * 32 = 1/2 gig)
skip = (32 * 2) we are grabbing piece 3...which means 2 have already been written so skip (2 * count)
i will edit this later if i can to make this all more understandable