Check These Out
################################################################################
# get all modified files since last commit and zip them to upload to live server
################################################################################
# delete previous tar output file
rm mytarfile.tar -rf
#rm c:/tarOutput/*.* -rf
# get last commit id and store in variable
declare RESULT=$(git log --format="%H" | head -n1)
# generate file list and export to tar file
git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT $RESULT | xargs tar -rf mytarfile.tar
# extract tar files to specified location
tar -xf mytarfile.tar -C c:/tarOutput
This command finds the 5 (-n5) most frequently updated logs in /var/log, and then does a multifile tail follow of those log files.
Alternately, you can do this to follow a specific list of log files:
sudo tail -n0 -f /var/log/{messages,secure,cron,cups/error_log}
Replace 'csv_file.csv' with your filename.
Also resolves symlinks, showing the full path of the link target
Shows all block devices in a tree with descruptions of what they are.
The above is just a prove of concept based around the nested bash substitution. This could be useful in situations where you're in a directory with many filetypes but you only want to convert a few.
$ for f in *.bmp *.jpg *.tga; do convert $f ${f%.*}.png; done
or you can use ls | egrep to get more specific... but be warned, files with spaces will cause a ruckus with expansion but the bash for loop uses a space delimited list.
$ for f in $(ls | egrep "bmp$|jpg$|tga$"); do convert $f ${f%.*}.png; done
I'm guessing some people will still prefer doing it the sed way but I thought the concept of this one was pretty neat. It will help me remember bash substitutions a little better :-P
Remember to backup everything before changing it so you can restore all to normal.
Using this command you can track a moment when usb device was attached.
creates associative array from apache logs, assumes "combined" log format or similar. replace awk column to suit needs. bandwidth per ip is also useful. have fun. I haven't found a more efficient way to do this as yet. sorry, FIXED TYPO: log file should obviously go after awk, which then pipes into sort.