LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   head command picking random files (https://www.linuxquestions.org/questions/linux-newbie-8/head-command-picking-random-files-4175571807/)

sunny singhal 02-09-2016 11:52 AM

head command picking random files
 
Hi,

I am using below command for moving files from one folder to another on the basis of date/time/name/count pattern. My command works fine but only concern is head command picking random files, I want it to pick top 30 files on basis of creation date and time.

mv -v `find . -type f -newermt "2016-02-08 00:00:00" ! -newermt "2016-02-08 16:55:00" | xargs ls | grep 'INB' | head -n 30` /tmp >> out.txt

Can someone please help.

grail 02-09-2016 12:11 PM

Please do not ask a second question based on the same details ... just add to your original question


All times are GMT -5. The time now is 07:03 AM.