Hi,
Below is a bash script that prints out the files that have been modified in
the last 5 days.
>From what I read it is not good to use ls -la in the manner I use below.
Could I run this by just using the find command with additional arguments?
I still need to be able to print everything that the ls -la command gives me
- file owner and group
- time stamp
- permissions set
----------------------------
#!/bin/bash
# note run above line with -x for debug mode
PATH=/usr/bin:/bin; export PATH
{ # disk space left
df -h;
echo "----";
# last logins to system
last;
# last 5 days of file modications sorted by the 9th column ( file path )
echo "---- Last 5 Days ----";
ls -lt $( find /websites/path/ -type f -mtime -5 ) | sort -k 9;
echo "---- Full List ----";
ls -lt /websites/path/*;
} | mail -s 'dev info' [EMAIL PROTECTED]
--
View this message in context:
http://www.nabble.com/Last-modified-files-with-owner---time---permissions-tp19419342p19419342.html
Sent from the Gnu - Bash mailing list archive at Nabble.com.