Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: ZSH Find command replacement



On Sat,  5 Apr 2014 06:53:57 +0000, Daniel Shahaf wrote:
> Aki Hoji wrote on Fri, Apr 04, 2014 at 16:18:58 -0400:
> > recently switched to ZSH.  I have a quick question.  What is the shortest ZSH command equivalent of a following command ? 
> > 
> > find . -ctime -1 -type d -exec mv {} /foo/ ; 
[...]
> I added a '--' for safety (in case a filename begins with a minus),
> but that's not specific to zsh; the 'find' version needs it too
> (as in, '-exec mv -- {} ... ;').

Actually it doesn't, as the paths find will give to mv will start with
'./' here, so any minus in a filename won't be at the start of an argument.

-- 
Michał Politowski
Talking has been known to lead to communication if practiced carelessly.



Messages sorted by: Reverse Date, Date, Thread, Author