Thursday, November 24, 2011

Linux - find files larger than

Find files in the directory larger than 500M:

find /path -size +500M

Thursday, November 3, 2011

Shell script - loop over files from the text file

In shell script to loop over the files from the list in the text file simply do:

#!/bin/sh

#Get the file list from the command line
filelist=$1; shift

#Loop over the files from the list
while read f
do
echo $f
#Put your commands here...
done < $filelist