Re: find and cp in one command...




Paul Pluzhnikov wrote:
"Robert Hicks" <sigzero@xxxxxxxxx> writes:

find ./ -name "*" -mtime -1

I need to pipe that to cp to move it to /tmp/20060810LK78

mv `find . -name "*" -mtime -1` /tmp/20060810LK78

If this gives you "command line too long", then

find . -name "*" -mtime -1 | xargs -i mv {} /tmp/20060810LK78

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.

Thanks! I can pipe some things but others throw me.

Robert

.



Relevant Pages

  • Re: Running a command-line program and reading/writing its stdin/stdout/stderr
    ... The reason it fails is that the 2 ends of the pipe are not ... In order to understand recursion you must first understand recursion. ...
    (comp.os.linux.development.apps)
  • Re: loss of data on pipes
    ... It sounds like a bug in your program. ... > a pipe be blocked if the pipe is full, ... > the mangled output problem besides writing to ... In order to understand recursion you must first understand recursion. ...
    (comp.unix.programmer)
  • Re: one producer thread, one consumer thread: mutex needed?
    ... your pipe works as a synchronization mechanism. ... If your threads communicate only via pipe, ... In order to understand recursion you must first understand recursion. ...
    (comp.unix.programmer)
  • Re: pclose vs. fclose
    ... whether the FILE's file descriptor is a pipe. ... This will fail (as in will call pclose() when fclose() should ... In order to understand recursion you must first understand recursion. ...
    (comp.os.linux.development.apps)
  • How to check if a thread waits for data at the read-end of a pipe?
    ... Win32 and in the Win32 version I need a way to check ... attach a semaphore to a named pipe and I can then use the other API ... My application acts as a GUI command line shell in this regard. ... child's STDIN, STDOUT and STDERR streams in standard documented ways. ...
    (microsoft.public.win32.programmer.kernel)