Mailinglist Archive: opensuse (1982 mails)

< Previous Next >
Re: [opensuse] forcing order of file copy
  • From: nordi <nordi@xxxxxxxxxxxx>
  • Date: Fri, 14 Nov 2008 13:20:54 +0100
  • Message-id: <491D6D26.5040809@xxxxxxxxxxxx>
Istvan Gabor wrote:
Regarding the solution you gave: it works with one directory at a time. What is if you have several directories and don't want to create and fill them individually?

Assuming that your music is stored in ~/mp3 and your MP3-player is mounted at /media/disk, you can use

cd ~/mp3
find . -print0 | sort -z | xargs -0 cp --parents --target-directory=/media/disk

Which will copy all files and directories in ~/mp3 recursively in alphabetical order and put them in /media/disk. Alphabetical order also regarding directory names, so ~/mp3/Abba/ will be copied before ~/mp3/ZZ_Top/.

Regards
nordi

--
Spam protection: All mail to me that does not contain the string "suse" goes to /dev/null.
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References