Cant find remote directory using find

Joined
Oct 17, 2012
Messages
2
Reaction score
0
Points
1
Im wanting to copy the directories inside a particular directory (rather than its contents) which resides on a server using terminal. The following code is perfect or near enough for what I want...

find "PATH_TO_ORIG_DIR" -type d -depth -print | cpio -pd "PATH_TO_CURRENT DIR"

To grab the actual path of both directories, I just dumped the folder into textEdit which gives me the path in plain text, then I copy and paste this into the command above. For a directory that exists locally I have no problems, but for one that exists on "/Volumes/Server...." terminal reports the directory doesnt exists.

I dont think its a firewall because I can navigate using finder to the same directory and I am also currently connected to this directory. The path itself mirrors exactly the same one that reads at the top of the finder window of the directory I have navigated to myself.

Any ideas?
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,745
Reaction score
2,071
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
Can you do a "ls /Volumes/Servers/<path name>" where <path name> is the directory of your choice and have it show a valid directory with its contents?
 
OP
J
Joined
Oct 17, 2012
Messages
2
Reaction score
0
Points
1
It insists the directory does not exist, however I can cd into the directory. Im wondering if spaces in the path name need backslashing? I wouldve thought wrapping the path around quotations would make backslash redundant. As luck would have it right the backslash key on my keyboard doesnt work so I cant conveniently check this right now! Having said that the path_to_ folder on my local drive has spaces also and terminal doesnt seem to mind.

What is your opinion?
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,745
Reaction score
2,071
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
Yes spaces need to be backslashed, but using the quotes should get around that. Not sure why it would having a problem with that..
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top