stats.sh audit #3
|
@ -1,23 +1,13 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
for dir in `cat /etc/proftpd/vpasswd | cut -d : -f 6`; do
|
set -o errexit
|
||||||
#for dir in /home/dalleFTP/reynaud_mila; do
|
set -o nounset
|
||||||
if [ -d $dir ]; then
|
#set -x
|
||||||
du -s $dir | cut -f 1 >$dir/.size
|
|
||||||
chmod 644 $dir/.size
|
|
||||||
|
|
||||||
#mtime=0
|
cut -d : -f 6 /etc/proftpd/vpasswd | while read -r dir; do
|
||||||
#export IFS=$'\n'
|
if [ -d "$dir" ]; then
|
||||||
#for file in `find $dir -type f -not -name .size -not -name .last-modified`; do
|
du -s "$dir" | cut -f 1 > "$dir"/.size
|
||||||
# timestamp=`stat -c %Y $file`
|
chmod 644 "$dir"/.size
|
||||||
# if [ $timestamp -gt $mtime ]; then
|
|
||||||
# mtime=$timestamp
|
|
||||||
# fi
|
|
||||||
#done
|
|
||||||
#unset IFS
|
|
||||||
|
|
||||||
#echo $mtime >$dir/.lastmodified
|
|
||||||
#chmod 644 $dir/.lastmodified
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue