Re: ls and rm command

  • From: krish.hariharan@xxxxxxxxxxxx
  • To: Joel.Patterson@xxxxxxxxxxx
  • Date: Mon, 3 Dec 2007 13:55:28 -0800 (PST)

the {} and \; are constructs of the find exec command and not of xargs and
that is the reason you get those errors

I am not sure about atime. Here is an excerpt from the man page

     -atime n
           True if the file was accessed n days ago.  The  access
           time of directories in path is changed by find itself.

Heisenberg could be at play here.

Could this work for you using mtime instead? That is what I use. I use the
find command. You could print the files using the find's print option
unless you are interested in the long listing of it.

-Krish

touch krish.fil

echo krish.fil | xargs ls -l
-rw-r--r--   1 oracle   dba            0 Dec  3 21:17 krish.fil

find . -name krish.fil -exec ls -l {} \;
-rw-r--r--   1 oracle   dba            0 Dec  3 21:17 ./krish.fil

find . -name krish.fil -print | xargs ls -l
-rw-r--r--   1 oracle   dba            0 Dec  3 21:17 ./krish.fil

find . -name krish.fil -print | xargs ls -l {} \;
{}: No such file or directory
;: No such file or directory
-rw-r--r--   1 oracle   dba            0 Dec  3 21:17 ./krish.fil



--
//www.freelists.org/webpage/oracle-l


Other related posts: