[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#258262: ITP: sortdir -- wrapper program to make files show up in sorted order



> > > This small wrapper program will make other programs see files and
> > > directories in a consistent, sorted order. This is e.g. usefull if you 
> > > want your tarballs to be a bit more rsyncable.
> > 
> > How is this better than tar cvf foo.tar $(find foo | sort) ?
> 
> I guess that if you try to do it for something ass big as the kernel
> source tree (for example), you would exceed both the maximal number of
> arguments and the maximal length of the command line. Moreover, that
> would fail with oddly-named files/directories that contain spaces,
> carriage returns or tabs in their name...

That's what find foo | sort | xargs tar rvf foo.tar is for. Handles
spaces, no command-line length overflow, no nothing, and does the same,
methinks.



Reply to: