|
|
|
|
Salut,
lami20j@debian:~/trash$ ls -al rep total 24 drwxr-xr-x 2 lami20j lami20j 4096 2007-05-26 13:53 . drwxr-xr-x 33 lami20j lami20j 20480 2007-05-26 13:55 .. -rw-r--r-- 1 lami20j lami20j 0 2007-05-26 13:53 a -rw-r--r-- 1 lami20j lami20j 0 2007-05-26 13:53 aa -rw-r--r-- 1 lami20j lami20j 0 2007-05-26 13:53 aaa -rw-r--r-- 1 lami20j lami20j 0 2007-05-26 13:53 .b -rw-r--r-- 1 lami20j lami20j 0 2007-05-26 13:53 .bb -rw-r--r-- 1 lami20j lami20j 0 2007-05-26 13:53 .bbb lami20j@debian:~/trash$ ls -al newrep ls: newrep: Aucun fichier ou répertoire de ce type lami20j@debian:~/trash$ cp -vR rep newrep `rep' -> `newrep' `rep/.bbb' -> `newrep/.bbb' `rep/aa' -> `newrep/aa' `rep/a' -> `newrep/a' `rep/aaa' -> `newrep/aaa' `rep/.bb' -> `newrep/.bb' `rep/.b' -> `newrep/.b' lami20j@debian:~/trash$ ls -al newrep total 24 drwxr-xr-x 2 lami20j lami20j 4096 2007-05-26 13:55 . drwxr-xr-x 34 lami20j lami20j 20480 2007-05-26 13:55 .. -rw-r--r-- 1 lami20j lami20j 0 2007-05-26 13:55 a -rw-r--r-- 1 lami20j lami20j 0 2007-05-26 13:55 aa -rw-r--r-- 1 lami20j lami20j 0 2007-05-26 13:55 aaa -rw-r--r-- 1 lami20j lami20j 0 2007-05-26 13:55 .b -rw-r--r-- 1 lami20j lami20j 0 2007-05-26 13:55 .bb -rw-r--r-- 1 lami20j lami20j 0 2007-05-26 13:55 .bbb lami20j |
En fait j'avais deja testé une methode comme ça mais avec un -Ra mais j'ai toujours le meme probleme...
|
Une autre possibilité
lami20j@debian:~/trash$ mkdir newrep lami20j@debian:~/trash$ ls -A1 rep a aa aaa .b .bb .bbb lami20j@debian:~/trash$ ls -A1 rep | xargs -I fic cp -v rep/fic newrep/ `rep/a' -> `newrep/a' `rep/aa' -> `newrep/aa' `rep/aaa' -> `newrep/aaa' `rep/.b' -> `newrep/.b' `rep/.bb' -> `newrep/.bb' `rep/.bbb' -> `newrep/.bbb' lami20j@debian:~/trash$ ls -A1 newrep/ a aa aaa .b .bb .bbblami20j |
Je ne suis pas sur d'avoir compris ta question.
|
OK je te remercie !
mkdir /home/$utilisateur/ cd /etc/skel ; tar -cf - . | (cd /home/$utilisateur ; tar -xvf -) puis pour modifier le proprietaire des fichier nouvelement copié : chown -R $NUSER:"users" /home/$NUSER chown $NUSER:"users" /home/$NUSER Voila encore merci! |
Salut,
lami20j@debian:~$ ls -al /etc/skel/ total 12 drwxr-xr-x 2 root root 1024 2003-08-11 10:19 . drwxr-xr-x 122 root root 6144 2007-05-27 18:06 .. -rw-r--r-- 1 root root 220 2006-12-11 22:20 .bash_logout -rw-r--r-- 1 root root 414 2006-12-11 22:20 .bash_profile -rw-r--r-- 1 root root 2227 2006-12-11 22:20 .bashrc lami20j@debian:~$ mkdir newrep lami20j@debian:~$ ls -A1 /etc/skel | xargs -I fic cp -pv /etc/skel/fic newrep/ `/etc/skel/.bash_logout' -> `newrep/.bash_logout' `/etc/skel/.bash_profile' -> `newrep/.bash_profile' `/etc/skel/.bashrc' -> `newrep/.bashrc' lami20j@debian:~$ ls -al newrep/ total 28 drwxr-xr-x 2 lami20j lami20j 4096 2007-05-27 18:31 . drwxr-xr-x 126 lami20j lami20j 12288 2007-05-27 18:31 .. -rw-r--r-- 1 lami20j lami20j 220 2006-12-11 22:20 .bash_logout -rw-r--r-- 1 lami20j lami20j 414 2006-12-11 22:20 .bash_profile -rw-r--r-- 1 lami20j lami20j 2227 2006-12-11 22:20 .bashrclami20j |