copying a a directory with sub folders changes names
CentOSThis forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
looks like you gave no usable information, just told us a few words about a "strange" thing.
Would be nice to explain what did you try exactly (what commands, what system ....), what did you expect and what's happened (instead)...
do you mean the first 3 directories?
I would say those are the DOS short names of those directories. I don't know why they were used instead of the full names. Is it ntfs?
ive worked out another way to do it, but i need help
once in the directory im going to run a find/exec command something like
find -type d -exec "*" {} \;
so basically this will find any sub dir and once it finds any sub dir it will still keep the same syntax as thats what i think " " does, do anything inbetween the "" will stay the same?
Last edited by robertkwild; 05-09-2017 at 07:28 AM.
You haven't answered the questions asked in post 3, what OS are you using and what filesystem from/to?
You escaped the spaces in the name of the parent directory in your command(s) but you also have spaces in the sub-directories. I avoid using spaces in folder/file names so I'm not sure what the solution would be. Your images are from a windows system, does the copying work from windows?
ive worked out another way to do it, but i need help
once in the directory im going to run a find/exec command something like
find -type d -exec "*" {} \;
so basically this will find any sub dir and once it finds any sub dir it will still keep the same syntax as thats what i think " " does, do anything in between the "" will stay the same?
?
what is -name "*" good for?
what is cp -r if you run find with -type f ?
are you seriously asking me?
it is not an actual this will work for you line of commands.
I would think:
you should know what -name "*" looks for
you should know what -type f means
you should know what cp -r does
you removed this ---> -exec that g0es to this ---> cp -r
so the line of progress is
find files anything then copy recursively to ---> path given... again it is not a this is what you need command line ..
it is this is the "shell pattern" you need to use just plug in what you need to make it work for you set of commands
because this will defiantly not work,
find -type d -exec "*" {} \;
cha cha cha changes ...
find [path] -type d -exec (wrong place --> "*") {} \;
find [path] -type d -exec mv -t {} [path] \;
but then what happens?
Code:
find path/* -type d -exec cp -r {} [destanation] \;
[root@archive Even When I Fall - January 2017 Project]# ls
Even When I Fall_Deliverables Even When I Fall_From Cutting Room Even When I Fall_Mix Session LtRt Stems for Editor
Even When I Fall_Dialogue Even When I Fall_Fx Even When I Fall_Music temp
[root@archive Even When I Fall - January 2017 Project]#
cp: cannot stat ‘./Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /Even When I Fall_Deliverables /temp’: File name too long
Last edited by robertkwild; 05-10-2017 at 03:42 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.