linux user group brescia

immagine del castello

Archivio della mailing list

cambio disco

Giuseppe Corbelli cowo a lugbs.linux.it
Lun 2 Ott 2000 20:23:15 UTC
...
Vebbe', ho capito che se non vi dico io come fare non la finite piu' :-))

cd / && echo cp -a `/bin/ls -1Ab | egrep -v "^new-disk$|^proc$"`
       /new-disk | sh
       
     (write this all on one line)
     This goes to the root directory and then copies all files and
     directories except /new-disk and /proc to /new-disk. Note that the
     first option after ls is the number 1, not the letter L!
     This command should work in all circumstances.
(cd / && tar cpf - . --exclude new-disk --exclude proc) | (cd
       /new-disk && tar xpf -)
       
     (write this all on one line)
     This goes to the root directory, "tars" everything except /new-disk
     and /proc, switches to /new-disk and "untars" everything there.
     Note that there must not be a slash before or after the names of
     the directories in the --exclude options.
     (Note: The option -l doesn't work here, since tar will still
     re-create the directories /new-disk and /proc even though it
     doesn't copy their contents. Therefore, tar's -l option doesn't
     have the same behaviour as the -x option on older versions of cp.)
     This method is somewhat slower than the others.

less /usr/doc/HOWTO/mini/Hard-Disk-Upgrade docet!
E' ufficialmente aperta la gara a chi suggerisce la riga di comando piu'
lunga che fa tutto da sola! :-)
--
  	Giuseppe "Cowo" Corbelli  -->>  Riding on Linux-2.2.16
  -<! I Never Wanted To Be What They Told Me To Be
  		Fulfill My Fate Then I'll Be Free >!-
  			Blind Guardian - Mordred's Song




Maggiori informazioni sulla lista Lug