Afficher un message
Vieux 29/04/2008, 18h32   #10
Dave B
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: rsync most recent files from large source

On Tuesday 29 April 2008 18:22, Dave B wrote:

> Stephane's solution handles filenames containing newlines (an unusual
> scenario). If you don't have such filenames, you can simplify it to:
>
> find . -type f -printf '%T@\t%p\n' |
> sort -rg |
> head -n 50 |
> cut -f2- |
> xargs -r ls -lU


I forgot to say that if you have filenames with spaces and tabs, you have to
modify IFS before executing the above commands.

IFS=$'\n' # or IFS="\n"
find ...

and possibly save the old value of IFS and restore it afterwards.

My advice is to just use Stephane's solution and be done with it.

--
D.
  Réponse avec citation
 
Page generated in 0,05585 seconds with 9 queries