dslreports logo
site
 
    All Forums Hot Topics Gallery
spc

spacer




how-to block ads


Search Topic:
uniqs
1543
share rss forum feed


El Quintron
Resident Mouth Breather
Premium
join:2008-04-28
Etobicoke, ON
kudos:4
Reviews:
·TekSavvy Cable
·TekSavvy DSL

Command line Copy from NFS share to NTFS USB3 drive

OK 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?

--
Support Bacteria -- It's the Only Culture Some People Have


tcg
Premium
join:2003-09-12
Lubbock, TX
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 Quintron
Resident Mouth Breather
Premium
join:2008-04-28
Etobicoke, ON
kudos:4
Reviews:
·TekSavvy Cable
·TekSavvy DSL
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.

--
Support Bacteria -- It's the Only Culture Some People Have


tcg
Premium
join:2003-09-12
Lubbock, TX
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 Quintron
Resident Mouth Breather
Premium
join:2008-04-28
Etobicoke, ON
kudos:4
Reviews:
·TekSavvy Cable
·TekSavvy DSL
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?
--
Support Bacteria -- It's the Only Culture Some People Have


El Quintron
Resident Mouth Breather
Premium
join:2008-04-28
Etobicoke, ON
kudos:4
Reviews:
·TekSavvy Cable
·TekSavvy DSL
reply to 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?

--
Support Bacteria -- It's the Only Culture Some People Have


tcg
Premium
join:2003-09-12
Lubbock, TX
reply to El Quintron
If this is on a linux system, I would say it's not recognized by linux.


tcg
Premium
join:2003-09-12
Lubbock, TX
reply 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 Quintron
Resident Mouth Breather
Premium
join:2008-04-28
Etobicoke, ON
kudos:4
Reviews:
·TekSavvy Cable
·TekSavvy DSL
reply 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.
--
Support Bacteria -- It's the Only Culture Some People Have


El Quintron
Resident Mouth Breather
Premium
join:2008-04-28
Etobicoke, ON
kudos:4
Reviews:
·TekSavvy Cable
·TekSavvy DSL
reply 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.
--
Support Bacteria -- It's the Only Culture Some People Have


El Quintron
Resident Mouth Breather
Premium
join:2008-04-28
Etobicoke, ON
kudos:4
Reviews:
·TekSavvy Cable
·TekSavvy DSL
reply to 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/12473/fi···son-tool

I'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.
--
Support Bacteria -- It's the Only Culture Some People Have


tcg
Premium
join:2003-09-12
Lubbock, TX
Cool. We'll have both learned something today.


El Quintron
Resident Mouth Breather
Premium
join:2008-04-28
Etobicoke, ON
kudos:4
Reviews:
·TekSavvy Cable
·TekSavvy DSL
reply to El Quintron
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.
--
Support Bacteria -- It's the Only Culture Some People Have


rolfp

join:2011-03-27
Oakland, CA
kudos:1
Reviews:
·Comcast

1 recommendation

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.
 


nwrickert
sand groper
Premium,MVM
join:2004-09-04
Geneva, IL
kudos:7
Reviews:
·AT&T U-Verse
reply 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.

--
AT&T Uverse; Zyxel NBG334W router (behind the 2wire gateway); openSuSE 12.2; firefox 16.0.2


rolfp

join:2011-03-27
Oakland, CA
kudos:1

1 recommendation

or,

$ cd Sea[TAB]

bash completion.


tcg
Premium
join:2003-09-12
Lubbock, TX
reply 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 /.


nwrickert
sand groper
Premium,MVM
join:2004-09-04
Geneva, IL
kudos:7
Reviews:
·AT&T U-Verse
reply 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.
--
AT&T Uverse; Zyxel NBG334W router (behind the 2wire gateway); openSuSE 12.2; firefox 16.0.2


El Quintron
Resident Mouth Breather
Premium
join:2008-04-28
Etobicoke, ON
kudos:4
Reviews:
·TekSavvy Cable
·TekSavvy DSL
reply 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.

--
Support Bacteria -- It's the Only Culture Some People Have


El Quintron
Resident Mouth Breather
Premium
join:2008-04-28
Etobicoke, ON
kudos:4
Reviews:
·TekSavvy Cable
·TekSavvy DSL
reply 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
--
Support Bacteria -- It's the Only Culture Some People Have


El Quintron
Resident Mouth Breather
Premium
join:2008-04-28
Etobicoke, ON
kudos:4
reply to rolfp
Duly noted, thanks for suggestion.

EQ