I don't understand. "ls" isn't going to backup anything. It just lists directory contents. If you want to do backups you use "tar", "cpio", etc. These utilities automatically back up the permissions with the files so when you restore them they maintain their original permissions (if you are root when you run the command that is). Or am I misunderstanding what you are getting at?
If you want to use the "cp" command to just copy files from one location to another then you would use the "-a" parameter to maintain permissions on the files:
Copy file:
# cp -a /sourcedir/subsourcedir /destinationdir
Create an archive file using tar:
# cd /
# tar -cvzf /destinationdir/mybackup.tar.gz sourcedir/subsourcedir
Restore all of the contents of archive:
# cd /
# tar -xvzf /destinationdir/mvbackup.tar.gz
Create a tape backup of /home using tar (if you have a SCSI tape drive):
# cd /
# tar -cvzf /dev/nrst home
[ December 04, 2002: Message edited by: void main ]