LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-16-2024, 12:58 AM   #31
linux-man
Member
 
Registered: Nov 2016
Location: Geneva
Distribution: native install of Parrot Home Edition 5.0 Debian (no security tools) 64 bit, KDE, 5.14.0-9parrot1,
Posts: 872

Original Poster
Rep: Reputation: Disabled

I need to copy all the files within a main folder called Videos on my desktop which was created by my os (not by me, came with os iso), it's where I store my videos. Within that is another 2nd folder called videos too (and other stuff). I need to copy everything from main folder Videos to my external drive called One Touch.

On the external drive called One Touch the main folder called Videos does not exist but all it's contents are do. Recently I have tidied up the main Videos folder on the desktop so right now it does not resemble what's on external drive. Do I need to delete everything on external drive and start again? And also since the main Video folder does not exist will rysnc create that if I use this below:


Code:
rsync -avh "/home/linux/Videos/" "/media/linux/One Touch/Videos/"
Also I used
Code:
rsync -avh dry-run  "/home/lenovo/Videos/" "/media/lenovo/One Touch/Videos/"
double space inadvertently after dry-run and it appears its copying everything over as it's taking a while usually dry-run only last few seconds, and it's been a few minutes. I guess a double space after dry-run means it won't be a dry run?

How do I tell it to stop or pause copying everything in terminal?

Last edited by linux-man; 03-16-2024 at 01:00 AM.
 
Old 03-16-2024, 02:58 AM   #32
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,796

Rep: Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201
It's an option --dry-run (or -n)
Code:
rsync -avh --dry-run  "/home/lenovo/Videos/" "/media/lenovo/One Touch/Videos/"
The Double space does not harm.

I don't know if this will create a missing Videos/ on the destination.
But the following will for sure:
Code:
rsync -avh  "/home/lenovo/Videos" "/media/lenovo/One Touch/"
Now it's told to copy the Videos directory itself, not its contents.
 
Old 03-16-2024, 05:50 PM   #33
linux-man
Member
 
Registered: Nov 2016
Location: Geneva
Distribution: native install of Parrot Home Edition 5.0 Debian (no security tools) 64 bit, KDE, 5.14.0-9parrot1,
Posts: 872

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MadeInGermany View Post
It's an option --dry-run (or -n)
Code:
rsync -avh --dry-run  "/home/lenovo/Videos/" "/media/lenovo/One Touch/Videos/"
The Double space does not harm.
The --dry-run with double space after it actually copied everything over, i.e. it didn't work as dry run.

If I need to stop rync for any reason whilst it's running what command should I use?
 
Old 03-17-2024, 04:02 AM   #34
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,855

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
Quote:
Originally Posted by linux-man View Post
The --dry-run with double space after it actually copied everything over, i.e. it didn't work as dry run.
That is almost impossible. I would rather say you forgot -- before dry-run (like in your post #20). Parsing command line (including spaces between arguments) processed by the shell before even starting the execution of the command (rsync) and the shell does not care about the number of those characters.

Quote:
Originally Posted by linux-man View Post
If I need to stop rync for any reason whilst it's running what command should I use?
Ctrl-C should work in most cases (not only with rsync).

Last edited by pan64; 03-17-2024 at 04:03 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to copy all files from one usb to another external device within dolphin file manager, no terminal. linux-man Linux - Newbie 2 07-23-2022 03:43 AM
copy installation from one HDD to another, which directory NOT to copy? bfzhou Linux - Newbie 9 03-16-2016 11:59 AM
Want to change how pasted files are named "(copy)," "(another copy)," "(3rd copy)" L a r r y Linux - Desktop 3 08-24-2013 03:39 PM
How to copy one line from one file to another file on line number.. gajananh999 Linux - Newbie 1 08-13-2012 05:27 AM
[SOLVED] Can't copy-paste from one terminal to another using vim cola Slackware 11 12-18-2009 10:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration