I am looking for a bash script example which does the following:
I have files being written under /tmp folder
I do at the xterm prompt, ls -ltr which gives me a list of recent files such as:
abc_mytest.log
abc_runTimeFailure.scripted.log
myManager.log
I want to move (mv) the most recent ones that were written today to a new folder which is under /home/project/.
I only want to move the ones that were created in /tmp in today's date only to /home/project/
Any example that the community can share will save me time before I re-invent the wheel.
Thanks, Eric
%symbols on the front of your filenames?lscommand, not at the beginning of every line of output. (2) Look atfind. … … … … P.S. Why do you believe that your question has anything to do with regular expressions? … … … … … … … … P.P.S. Please do not respond in comments; edit your question to make it clearer and more complete.