|
#1
| |||
| |||
| copying folders in terminal I'm trying to copy a folder in terminal with all the contents inside of it but when I use the -r option, it just copy's the files within the folder to the destination so it doesn't create a new folder in the destination, it just copy's the individual files there. Also, some of these files may be corrupt but is there a way that it will notify you if it is corupt?
__________________ 3G iPhone on Rogers network 20" iMac 1.83GHz Intel Core Duo w/1.5GB of ram 15" Macbook Pro 2.2GHz Intel Core 2 Duo w/2GB of ram - In a world without walls and fences, who needs Windows and Gates? |
|
#2
| ||||
| ||||
| You should do this: Code: cp -r [source folder] [destination directory]/[foldername]/ The 'cp' command does not test for "corrupt" files, since files are nothing more than binary bits... how would a copy operation detect that a bit is supposed to be a 1 instead of a 0? "Corrupt" file could mean anything -- a PhotoShop file that has a 1px black line through it may be "corrupt" to you, but it's just a bunch of bits to the computer and the computer doesn't know that line isn't supposed to be there.
__________________ Power Macintosh G4/500MHz "Yikes!" 10.4.11 Server • 1024MB • 3 x 120GB + 320GB • DVR-111D • 2 x Radeon 7000 PCI • 2 x 17" CRT MacBook 2.0GHz Core 2 Duo - White 10.5.5 • 2048MB • 80GB • CD-RW/DVD-ROM iPod Photo 60GB • iPod nano 1GB • AT&T DSL 6Mb/768k http://www.jeffhoppe.com |
|
#3
| |||
| |||
| Ok, well that makes sense, very good point. Thanks for your help
__________________ 3G iPhone on Rogers network 20" iMac 1.83GHz Intel Core Duo w/1.5GB of ram 15" Macbook Pro 2.2GHz Intel Core 2 Duo w/2GB of ram - In a world without walls and fences, who needs Windows and Gates? |
|
#4
| |||
| |||
| One last question about copying files. If I login to the mac remotely using SSH and start copying files, does it continue to copy after I log out of SSH?
__________________ 3G iPhone on Rogers network 20" iMac 1.83GHz Intel Core Duo w/1.5GB of ram 15" Macbook Pro 2.2GHz Intel Core 2 Duo w/2GB of ram - In a world without walls and fences, who needs Windows and Gates? |
|
#5
| ||||
| ||||
| Nope, unless you launch the process as a background process.
__________________ Power Macintosh G4/500MHz "Yikes!" 10.4.11 Server • 1024MB • 3 x 120GB + 320GB • DVR-111D • 2 x Radeon 7000 PCI • 2 x 17" CRT MacBook 2.0GHz Core 2 Duo - White 10.5.5 • 2048MB • 80GB • CD-RW/DVD-ROM iPod Photo 60GB • iPod nano 1GB • AT&T DSL 6Mb/768k http://www.jeffhoppe.com |
|
#6
| |||
| |||
| First of all I need to say: Man I love this site! I get much more qualified people to answer my questions then even AppleCare and I get a answer sooner then AppleCare because of the usual wait time. How can I make it a background process?
__________________ 3G iPhone on Rogers network 20" iMac 1.83GHz Intel Core Duo w/1.5GB of ram 15" Macbook Pro 2.2GHz Intel Core 2 Duo w/2GB of ram - In a world without walls and fences, who needs Windows and Gates? |
|
#7
| ||||
| ||||
| You can put a "&" at the end of the command. ie: cp * /stuff & to bring it back to the foreground, type "fg"
__________________ Matt 400Mhz G4 PowerMac 867Mhz G4 Powerbook 1.0 Ghz G4 eMac 2.0 Ghz Intel Duo MacBook |
|
#8
| ||||
| ||||
| As far as I know, that will not work if you log out of SSH before the copy is complete. |