I want to remove all the files in the directory I am in currently in that were created today.
So if today is April 3rd then the UNIX commond I am asking for would remove someFile2, someFile3, someFile4 and someFile5. This command would not remove someFile1.
someUser@:/someDirectory$ ls -lrt -rw-r--r-- 1 someUser someUser 4242 Mar 30 12:12 someFile1.dat -rw-r--r-- 1 someUser someUser 0 Apr 03 12:12 someFile2.dat -rw-r--r-- 1 someUser someUser 42424242 Apr 03 12:12 someFile3.dat -rw-r--r-- 1 someUser someUser 0 Apr 03 12:12 someFile4.dat -rw-r--r-- 1 someUser someUser 424242 Apr 03 12:12 someFile5.dat
My OS is AIX.
Currently, I am running the following four commands over and over in order to achieve this and this takes to much time because I am testing and need to remove this files often. The filenames are always different (timestamps are used in the real file names).
rm someFile2.dat rm someFile3.dat rm someFile4.dat rm someFile5.dat