Check These Out
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
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
)
the --time-style argument to 'ls' takes several possible modifiers: full-iso, long-iso, iso, locale, +FORMAT.
The +FORMAT modifier uses the same syntax as date +FORMAT.
--time-style=+"%Y-%m-%d %H:%M:%S" strikes a happy medium between accuracy and verbosity:
$ ls -lart --time-style=long-iso
doesn't show time down to the nearest second,
$ ls -lart --time-style=full-iso
displays time to 10E-9 second resolution, but with no significant digits past the full seconds, also showing the timezone:
$ -rw-r--r-- 1 bchittenden bchittenden 0 2011-02-10 12:07:55.000000000 -0500 bar
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).
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/
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
The grep switches eliminate the need for awk and sed. Modifying vim with -p will show all files in separate tabs, -o in separate vim windows. Just wish it didn't hose my terminal once I exit vim!!