Thursday, 3 April 2014

Display recently modified files in Linux


Display Today’s modified Files in Linux

ls -al --time-style=+%D | grep `date +%D`
find . -maxdepth 1 -mtime -1
find . -mtime -1 -print
find . -mtime -1 -printf "%u %p\n" | sort

Display recently modified file in present working directory

find -maxdepth 1 -type f -mtime -1
find -maxdepth 1 -type f -daystart -mtime -1
find "pwd" -mtime -1 -type f -print
find . -type f -printf '%TY-%Tm-%Td %TT %p\n' | sort -r


Display recently modified directory in present working directory

find -maxdepth 1 -type d -mtime -1
find -maxdepth 1 -type d -daystart -mtime -1
find "pwd" -mtime -1 -type d -print
find . -type d -printf '%TY-%Tm-%Td %TT %p\n' | sort -r


No comments:

Post a comment