07-17-2013, 10:54 AM #1
Using Terminal - Copied Folder Converted to Document
- Member Since
- Jul 17, 2013
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:
cp -av [filepath/folders/to/copy] [filepath/destination]
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.
07-17-2013, 11:29 AM #2
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.Always listen to experts. They’ll tell you what can’t be done and why. Then do it!
07-17-2013, 11:47 AM #3
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.
07-18-2013, 09:23 AM #4
- Member Since
- Jul 17, 2013
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
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)?
07-18-2013, 10:32 AM #5
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?Always listen to experts. They’ll tell you what can’t be done and why. Then do it!
07-18-2013, 10:36 AM #6
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By TNPeel in forum OS X - Operating SystemReplies: 2Last Post: 09-10-2012, 03:59 PM
By TheLegend in forum OS X - Apps and GamesReplies: 2Last Post: 03-01-2012, 06:23 PM
By abhiiiiii21 in forum Movies and VideoReplies: 2Last Post: 12-16-2011, 02:31 AM
By dphilly53 in forum OS X - Operating SystemReplies: 0Last Post: 10-12-2010, 10:39 AM
By heidixgirl in forum Apple DesktopsReplies: 1Last Post: 07-30-2009, 04:40 PM