Government Security
Network Security Resources

Jump to content


New Files Created Today Etc

- - - - -
  • Please log in to reply
No replies to this topic

#1 Kenny


    Former Commander In Chief

  • Retired Admin
  • 6,747 posts

Posted 04 January 2008 - 10:25 AM

handy one liner i come across so thought i would add it as a bash script

This script will FIND all files created via a daily check on the directory you wish to view..can run as a cron job daily.. reason its handy lets you know whats been created while you been away etc it will save a file to txt to view

# saved as
# Find files created today with this script 
# Example :by Kenny GSO
# This will print files ,date, time , size and name 
# Saves results to today.txt for viewing
# date:3.1.2008 

TODAY=$(date '+%Y-%m-%d')
ls --full-time -t | grep $TODAY \
   | awk '{print $6"\t"$7"\t"$5"\t"$9}' > today.txt


chmod u+x


./ or whatever flavour



sample output is

2008-01-04 --- 17:48:58.000000000 --- 0-- today.txt
2008-01-04 --- 01:21:07.000000000--- 431--

or for more details on other files as root create and place it in /var/log directory run as root ... this will give you more details of logs and files created today within

you will know exactly what files have changed and view them changes

Kenny aka ComSec

Please read the Forum Rules !!!