This site is moved to other domain!

You should be automatically redirected in 9 seconds. If not, visit
and update your bookmarks.

Friday, January 9, 2009

Stumble Upon Toolbar
written by: Ukion in
[] [] []

Linux tip: How to list / find only today files

Don't want to miss a single bit? Subscribe to our RSS Feed!

Sometime in your working day, you created a text file, which now is urgently required. The problem is that you can't remember what name you gave it, your home folder(or other folder) is full of over 1000 different files. You are probably familiar with the problem. The question is how can you find the file? There are various ways, but this tip shows you the power of pipes and joining together two powerful shell commands:

ls -al --time-style=+%D | grep `date +%D`
The parameters to the ls command here cause the datestamp to be output in a particular format. The cunning bit is that the output is then passed to grep. The grep parameter is itself a command (executed because of the backticks), which substitutes the current date into the string to be matched. You could easily modify it to search specifically for other dates, times, filesizes or whatever. Combine it and that's it!

Subscribe to DetectorProDid you enjoy this post? Why not leave a comment below and continue the conversation, or Subscribe to Feed and get articles like this delivered automatically to your Email or feed reader.

Related articles by tags


Anonymous said...

You could of course just do it properly

find -mtime -1