Using Terminal - Copied Folder Converted to Document

Joined
Jul 17, 2013
Messages
2
Reaction score
0
Points
1
Hi,

Using Terminal, my boss copied a folder on her desktop to another folder, also on her desktop. Somehow, in copying, she overwrote the destination folder - which contained other files. It changed the destination folder to a text file.

She closed the window before alerting me, so I don't know the exact path she typed. Still it was probably something like this:

Code:
cp -av [filepath/folders/to/copy] [filepath/destination]

She typed "cp -av" and dragged the folders into the Terminal window (she never typed the path). So, Terminal places the exact filepath. In the text file, it looks like the information is still there, it just needs to be converted back.

The odd thing, is that we performed some tests afterwards, performing the same steps with other directories, and it worked correctly - copied the entire folder and subsequent files into the destination folder intact. I and another have performed this before and after, again, with no problems.

I thought it might be because in Terminal, there was no end slash ("/"), but when testing, even though I didn't see end slashes, it copied over just fine.

I'd like to know if anyone else has experienced this issue and how they resolved it. I want to convert the document back to it's original folder structure.

The OS is 10.6.8.

Please let me know if I need to provide any further information.

Thanks.

Stephen
 
Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
If it hasn't been too long (days) open a Terminal and type 'history' without the quotes.
This will tell you what was typed to do this and might reveal a possible solution.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Or, if you haven't executed much else, just push the up arrow until you find the command. It's perhaps not as elegant as cradom's suggestion but I thought I'd throw another option in there.
 
OP
S
Joined
Jul 17, 2013
Messages
2
Reaction score
0
Points
1
Took a while to get the information.

Thanks - typing 'history' provided this:

Kxxx-Bxxx:~ kxxxxxxx$ history
1 /Volumes/1234567_MAC/LS\ Agency/\ \ \ \ \ \ TEMPORARY\ FOLDER/\ \ \ \ \ \ XYZ\ Client\ Sample\ files/XYZ\ Decision\ Guide/XYZDecGuide ; exit;
2 /Users/kxxxxxxx/Desktop/SF3-removal-tool.command ; exit;
3 cp -av /Users/kxxxxxxx/Desktop/Kxxxx /Users/kxxxxxxx/Desktop/\ CURRENT\ PROJECTS
4 cp -av /Users/kxxxxxxx/Desktop/\ CURRENT\ PROJECTS /Users/kxxxxxxx/Desktop/untitled\ folder
5 cp -av /Users/kxxxxxxx/Desktop/Segmentation\ Examps /Users/kxxxxxxx/Desktop/test
6 cp -av /Users/kxxxxxxx/Desktop/INFOGRAPHICS /Users/kxxxxxxx/Desktop/test
7 history

I don't know what #1 and #2 are. Those may be the ones that caused the problem. #3-6 look fine to me. #5 and #6 where the ones I watched her perform.

Does the line with "removal-tool.command" imply that the files were removed (deleted)?

Thanks.

Stephen
 
Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
Ok, first off, if you're working with Terminal a lot, don't use spaces in file/directory names. Too much work to escape them.
Also, don't use certain characters in names (/\:) etc. It's very hard to read no 1, cant tell what's file/dir and what's an escape.
No 1: Some kind of command on an external drive?
No 2: looks like something 'might' have been removed.
No 3: copying Kxxxx into CURRENT PROJECTS
NO 4: copying CURRENT PROJECTS into untitled folder

More copy commands. I cant really see a mistake. Try ls -la in Terminal in the Desktop folder. Which folder turned into a file?
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
The SF3-removal-tool command file is the uninstaller for Suitcase Fusion (see here).
 

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