Posts: 24,633
Threads: 1,093
Joined: May 2025
OK.. I'm using Apple Remote Desktop to send a terminal command, run as root, to 30 computers.
Example;
chflags nouchg /Users/Shared/Application Aliases/•Games/Deimos Rising
rm -f /Users/Shared/Application Aliases/•Games/Deimos Rising
Unlock the file, and remove the file...
It seems to be choking on the spaces in the directory names...
How do I "phrase" things so it will do what I'm trying to do?
(I'd just go to each computer, but this is an experiment before running the same thing on 130 MORE computers....).
I know I"m close here...
Tips appreciated!
Posts: 24,633
Threads: 1,093
Joined: May 2025
An example of the output from ARD;
Lab 02 (192.168.69.129)
chflags: /Users/Shared/Application: No such file or directory
chflags: Aliases/•Games/Deimos: No such file or directory
chflags: Rising: No such file or directory
It no likey the space...
Posts: 8,279
Threads: 628
Joined: Jan 2009
Reputation:
0
put the file or directory name in quotes.
Posts: 2,581
Threads: 453
Joined: Jan 2022
Reputation:
0
That'll work, but the more official way to do it is to use a '\' (without the quotes. Just the slash) before the space. It essentially means that anything that comes after it, take it exactly how it is.
Posts: 37,103
Threads: 2,599
Joined: May 2025
Reputation:
0
dragging the file into the terminal will escape special chars automagically
Posts: 24,633
Threads: 1,093
Joined: May 2025
Quotes got it...
"\" got it...
Can't really drag it into Terminal the way I'm doing it (using ARD), but I'll keep it in mind!
Thanks guys! You just saved me several hours of visiting 26 classrooms!
Posts: 5,094
Threads: 1,252
Joined: Sep 2012
Reputation:
0
You shouldn't have files or paths with spaces. :-)
Posts: 24,633
Threads: 1,093
Joined: May 2025
Sure.. I know that NOW.. but I'm stuck with the hand I've been dealt for now
Posts: 3,094
Threads: 111
Joined: Apr 2007
Reputation:
0
[quote Greg the dogsitter]You shouldn't have files or paths with spaces. :-)
While we're at it, just stick with 8.3 filenames and you'll be fine no matter what you do.
Living in 1980 is nice, isn't it?
Or is that, Living\ in\ 1980\ is\ nice,\ isnt\ it?