El QuintronCancel Culture Ambassador Premium Member join:2008-04-28 Tronna |
Command line Copy from NFS share to NTFS USB3 driveOK here's what I'm trying to do, I'm trying to do a command line copy from an NFS share to an NTFS USB drive attached to my computer, it has approximately 71 121 files in it, hovering about 595.7 GB. I'm current trying to copy it via drag and drop and I'm doing OK, but I'm getting encoding errors, as some of the files have accented characters, and another bunch are named with the Cyrillic alphabet. I was going to try and do with the command line but I bumped into another problem; I can't seem to change directory into my USB drive /media$ ls
Seagate Backup Plus Drive
I tried with "cd /Seagate Backup Plus Drive" or "cd /seagate_backup_plus_drive" or "cd /UUID/folder" I can't seem to get in there either. What I'd like to do at this point is redo the copy on the command line, with an option to skip the already copied files and "just copy" the files with funky names. Any advice? |
|
tcg Premium Member join:2003-09-12 Lubbock, TX |
tcg
Premium Member
2012-Nov-24 10:24 am
Since you're already in the media directory, type
cd "Seagate Backup Plus Drive"
Personally, I would change the drive name to something much shorter, without spaces, such as SBPD, but then - I'm lazy. |
|
El QuintronCancel Culture Ambassador Premium Member join:2008-04-28 Tronna |
said by tcg:Since you're already in the media directory, type
cd "Seagate Backup Plus Drive"
Personally, I would change the drive name to something much shorter, without spaces, such as SBPD, but then - I'm lazy. OK that worked... I made the mistake of starting my file transfer already so after that's done I'll most definitely be changing it over. What do you suggest as a way to get the awkwardly titled files over? There's probably about 100 of them, so I don't want to rename all of them manually. |
|
tcg Premium Member join:2003-09-12 Lubbock, TX |
tcg
Premium Member
2012-Nov-24 10:51 am
Liberal use of wildcards, I guess. But unless there's some equivalent character/substitute on the NTFS side, the files may or may not be accessible. A better choice might be some renaming before copying... |
|
|
El QuintronCancel Culture Ambassador Premium Member join:2008-04-28 Tronna |
said by tcg:Liberal use of wildcards, I guess. But unless there's some equivalent character/substitute on the NTFS side, the files may or may not be accessible. A better choice might be some renaming before copying... The unrecognized characters represented with a black diamond with a question mark in it. So is it that NTFS doesn't recognize non-English alphabet characters? |
|
El Quintron |
I was doing some research and someone proposed this as a possible solution for bad characters in Gnome: convmv -r --notest -f windows-1252 -t UTF-8 *
I guess I'm trying to figure out if the issue with Ubuntu or the NTFS drive... since I opted to skip all the errors the thing has been humming along nicely. Is there a way to search the source drive quickly for all the non-compliant characters? |
|
tcg Premium Member join:2003-09-12 Lubbock, TX |
to El Quintron
If this is on a linux system, I would say it's not recognized by linux. |
|
tcg |
to El Quintron
said by El Quintron:I was doing some research and someone proposed this as a possible solution for bad characters in Gnome:
convmv -r --notest -f windows-1252 -t UTF-8 *
I guess I'm trying to figure out if the issue with Ubuntu or the NTFS drive... since I opted to skip all the errors the thing has been humming along nicely. Is there a way to search the source drive quickly for all the non-compliant characters? I'm sure there is a way, but it's above my pay grade. :) |
|
El QuintronCancel Culture Ambassador Premium Member join:2008-04-28 Tronna |
to tcg
Well there's only another six hours to go, so I'll compare the two folders, and give it a crack from there.
I have a bunch of French and Russian mp3s that are most likely causing the problem, what I'll most likely do is compare the two folders and go from there. |
|
El Quintron |
to tcg
said by tcg:I'm sure there is a way, but it's above my pay grade. And mine... I'm mostly doing this because I want to run Squeezebox server and Subsonic from both Windows and Linux, SBS is giving me too much hassles to run from my NAS. |
|
El Quintron |
OK so the post copy comparison won't be all that difficult; there's half a dozen tools I can use to get the job done: » askubuntu.com/questions/ ··· son-toolI'll post back in couple of hours once the copying is done and we can see how much did make it over. I enjoy this stuff when it's non-critical, that way I can note all the details without stressing out. |
|
tcg Premium Member join:2003-09-12 Lubbock, TX |
tcg
Premium Member
2012-Nov-24 1:27 pm
Cool. We'll have both learned something today. |
|
El QuintronCancel Culture Ambassador Premium Member join:2008-04-28 Tronna |
Quick update, I had a quick power failure, which killed my transfer and forced me to use "Meld" for the first time.
Super useful; showing all the matching directories and all the missing files along with the options to copy left or copy right. I also shows which files have bad encoding. |
|
rolfpno-shill zone Premium Member join:2011-03-27 Oakland, CA
1 recommendation |
rolfp
Premium Member
2012-Nov-25 8:27 am
I've found that detox will easily convert bash-unfriendly names. $ urpmq -i detox
Name : detox
Version : 1.2.0
Release : 2mdv2011.0
Group : File tools
Size : 138781 Architecture: x86_64
Source RPM : detox-1.2.0-2mdv2011.0.src.rpm
URL : http://detox.sourceforge.net
Summary : A console utility to clean up filenames
Description :
The detox utility renames files to make them easier to work with. It
removes spaces and other such annoyances. It'll also translate or
cleanup Latin-1 (ISO 8859-1) characters encoded in 8-bit ASCII, Unicode
characters encoded in UTF-8, and CGI escaped characters.
|
|
|
to tcg
said by tcg:Since you're already in the media directory, type
cd "Seagate Backup Plus Drive" I would normally use: cd Seagate* or even cd Sea* That won't work if there are more than one directory with name beginning "Sea", but that is a rare problem. |
|
rolfpno-shill zone Premium Member join:2011-03-27 Oakland, CA
1 recommendation |
rolfp
Premium Member
2012-Nov-25 10:37 am
or,
$ cd Sea[TAB]
bash completion. |
|
tcg Premium Member join:2003-09-12 Lubbock, TX |
to nwrickert
said by nwrickert:said by tcg:Since you're already in the media directory, type
cd "Seagate Backup Plus Drive" I would normally use: cd Seagate* or even cd Sea* That won't work if there are more than one directory with name beginning "Sea", but that is a rare problem. :headsmack: True enough. I was using his examples and trying to show that he needed to move the first " and drop the /. |
|
|
to El Quintron
said by El Quintron:What I'd like to do at this point is redo the copy on the command line, with an option to skip the already copied files and "just copy" the files with funky names. If you happen to be running samba, then the easiest trick might be to temporarily share that NFS mounted directory over samba, and do the copying on a windows box. That way, the samba name mangling will handle most of the renaming problems for you. |
|
El QuintronCancel Culture Ambassador Premium Member join:2008-04-28 Tronna |
to tcg
said by tcg:said by nwrickert:said by tcg:Since you're already in the media directory, type
cd "Seagate Backup Plus Drive" I would normally use: cd Seagate* or even cd Sea* That won't work if there are more than one directory with name beginning "Sea", but that is a rare problem. :headsmack: True enough. I was using his examples and trying to show that he needed to move the first " and drop the /. Good advice, since the copy fail I've renamed it to something a little more manageable... however everything above was actually great at getting me in there from the command line. Thanks everyone. |
|
El Quintron |
to nwrickert
You're right about that, seeing as the sending drive was attached to NAS and it was being shared via both NFS and Samba I should have tried that.
One of the things Merge did manage to do before the GUI started crashing was point out all the files with bad encoding. I'd assumed there'd be 100+ files both there was only about 20, they've all be renamed.
Out of curiosity before I start this again, any care to take a stab at what would be faster?
NFS share to local USB3 drive (what I was doing before)
-or-
USB2 EXT3 Drive on Ubuntu to USB 3 NTFS drive. (What I was thinking of trying the second time around)
EQ |
|
El Quintron |
to rolfp
Duly noted, thanks for suggestion.
EQ |
|