Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

SheerGold

macrumors regular
Original poster
Apr 20, 2006
112
0
Hi,

I am using Ventura 13.0.1

I am trying to use Terminal to make a copy of this disk image:
copy of Time Machine backup of My Work 1.dmg
to my Drop Box folder.

I am using this command:
sudo -s
mv < /Users/computech-com/copy\ of\ Time\ Machine\ backup\ of\ My\ Work\ 1.dmg >< /Users/computech-com/Public/Drop\ Box "/">

But Terminal is giving this error message:

Last login: Fri Feb 24 04:28:41 on ttys001
computech-com@MacBook-Pro-3 ~ % sudo -s
mv < /Users/computech-com/copy\ of\ Time\ Machine\ backup\ of\ My\ Work\ 1.dmg >< /Users/computech-com/Public/Drop\ Box "/">
zsh: parse error near `<'
computech-com@MacBook-Pro-3 ~ %

Anyone know what the command should be?

Thanks,

Best regards,

Paul
 
There's no need to use the <> symbols. The command is simply

$ mv /path/source /path/target
Thanks for the correction.

I did this 35 minutes ago.
But so far the Drop Box is not showing any changes.
35 minutes ago it was showing as having 6 KB size, and that has not changed at all.

Maybe that's because the dmg to be copied has a size of 68GB.

Would that be the reason?
Or are there other explanations?
 
1. Don’t use move, use copy (cp). If the operation is successful, you can then delete the source.

2. Quotes can be used for folders with spaces in the name, so you can write a command like this

Code:
sudo cp "/Users/computech-com/copy of Time Machine backup of My Work 1.dmg" "/Users/computech-com/Public/Drop Box"

or like this

Code:
cp /Users/computech-com/copy\ of\ Time\ Machine\ backup\ of\ My\ Work\ 1.dmg /Users/computech-com/Public/Drop\ Box

Edited to fix formating
 
Last edited:
Thanks for the correction.

I did this 35 minutes ago.
But so far the Drop Box is not showing any changes.
35 minutes ago it was showing as having 6 KB size, and that has not changed at all.

Maybe that's because the dmg to be copied has a size of 68GB.

Would that be the reason?
Or are there other explanations?
Try navigating out of your Dropbox folder and go back in. Finder doesn't really update file sizes in real time. Depending on your HDD/SDD speed, it could take a while to move the files over.
 
i'd say that this is more dependent on your upload speed.
i'm terrible at maths, but if i didn't do anything wrong, i think it would take me around 3h45min even if i had a constantly perfect upload with my ISP at 100Mbit DL / 40Mbit UL
 
Hello bogdanw,

The codes are looking promising.
But they need some adjustment.

Using the first code Terminal responds with:
dquote>

Using the second code Terminal gives the same response:
dquote>

Please see the attached screenshot, where both codes have been used.
 

Attachments

  • Screenshot 2023-02-24 at 10.15.43.png
    Screenshot 2023-02-24 at 10.15.43.png
    67.6 KB · Views: 91
Sorry, I must have copy-pasted with formatting
Code:
sudo cp "/Users/computech-com/copy of Time Machine backup of My Work 1.dmg" "/Users/computech-com/Public/Drop Box"

Code:
cp /Users/computech-com/copy\ of\ Time\ Machine\ backup\ of\ My\ Work\ 1.dmg /Users/computech-com/Public/Drop\ Box

You can use rsync to track the progress
Code:
rsync -a --progress --stats --human-readable /Users/computech-com/copy\ of\ Time\ Machine\ backup\ of\ My\ Work\ 1.dmg /Users/computech-com/Public/Drop\ Box
 
I have seen the attachment.
I can confirm that the commands from post #8 work.
By the way, why do you want to perform this operation from Terminal when you can just drag&drop in Finder?
 
I have seen the attachment.
I can confirm that the commands from post #8 work.
By the way, why do you want to perform this operation from Terminal when you can just drag&drop in Finder?
Because the dmg I want to co
 
Hello bogdanw,

I have tried drag&drop in Finder, but it sems that Time Machine backups are Read Only. See attachment.
I also tried copying to a Sparse Image, but the Read Only Sharing & Permissions prevented that.

In my Post, i was barking up the wrong tree.

What had happened is that I had 4 Time Machine backups.
But 3 of them becme corrupted. There was no longer anything in them.

I had one left. That is:
Time Machine backup of My Work 1 (MicroSD Kingston 124 GB) - from Nov 29, do NOT erase

So I tried to make a copy of that. But nothing worked.
Even making a sparse image of the Time Machine backup was not helpful. When I went to do a restore, that started okay, but timed out.

So I used Disk Drill to make a dmg of the Time Machine backup.
That is how I got the dmg.

It was at that point that I became confused.

I should have tried using Terminal to copy the actual Time Machine backup. Instead I was trying to copy the dmg.

Anyway, I have now tried what I should have been doing. I used the code you provided, and modified it to make the copy.

The code I used is:
/Volumes/Time\ Machine\ backup\ of\ My\ Work\ 1\ \(MicroSD\ Kingston\ 124\ GB\)\ -\ from\ Nov\ 29\,\ do\ NOT\ erase/Volumes/SanDisk\ 125\ GB

No matter what I tried I always get this Terminal response:
zsh: no such file or directory: /Volumes/Time Machine backup of My Work 1 (MicroSD Kingston 124 GB) - from Nov 29, do NOT erase/Volumes/SanDisk 125 GB
computech-com@MacBook-Pro-3 ~ %

It is saying: MacBook-Pro-3, because I have three MacBook's all open at the same time. So each one has been alloted a suffix 1, 2 or 3.

Any idea why the code is not working?
 

Attachments

  • Screenshot 2023-02-24 at 14.57.47.png
    Screenshot 2023-02-24 at 14.57.47.png
    72.9 KB · Views: 59
screenshot attached
 

Attachments

  • Screenshot 2023-02-24 at 19.31.17.png
    Screenshot 2023-02-24 at 19.31.17.png
    81.3 KB · Views: 72
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.