F5F Stay Refreshed Software Operating Systems Transfer all data from your notebook's hard drive to a USB flash drive correctly using the command line.

Transfer all data from your notebook's hard drive to a USB flash drive correctly using the command line.

Transfer all data from your notebook's hard drive to a USB flash drive correctly using the command line.

0
07GmanBEAST07
Member
213
05-02-2023, 10:39 PM
#1
Hello Community, thank you for your message. The thread is now resolved. I’m ready to install Notebook Fresh and have a large USB stick available. My main question is: what command should I use to copy all files from my notebook’s hard drive to the USB flash drive using tty4? Also, regarding Dolphin errors—why don’t all files appear when copying?
0
07GmanBEAST07
05-02-2023, 10:39 PM #1

Hello Community, thank you for your message. The thread is now resolved. I’m ready to install Notebook Fresh and have a large USB stick available. My main question is: what command should I use to copy all files from my notebook’s hard drive to the USB flash drive using tty4? Also, regarding Dolphin errors—why don’t all files appear when copying?

O
orleanseifert
Junior Member
2
05-02-2023, 11:36 PM
#2
That's because dolphin is user permission. You require root permission. If you are simply dismantling the os and reinstalling the os sure there's rsync command and cp command you can run them with sudo to run command as root. Here's quick chatgpt answer on those commands. Spoiler Sure, here are some examples of commands using `rsync` and `cp` in Linux: `rsync` command: rsync -avz /path/to/source/directory /path/to/destination/directory This command will recursively copy the contents of the source directory to the destination directory, preserving the file permissions, ownerships, and timestamps. The `-a` option enables archive mode, the `-v` option enables verbose output, and the `-z` option enables compression during transfer. `cp` command: cp -r /path/to/source/directory /path/to/destination/directory This command will recursively copy the contents of the source directory to the destination directory. The `-r` option enables recursive mode, which is necessary to copy directories and their contents. Note: Be careful when using these commands, especially with `rsync`, as they can overwrite files and directories without warning. Always double-check the source and destination paths before running these commands. Hope it helps and good luck.
O
orleanseifert
05-02-2023, 11:36 PM #2

That's because dolphin is user permission. You require root permission. If you are simply dismantling the os and reinstalling the os sure there's rsync command and cp command you can run them with sudo to run command as root. Here's quick chatgpt answer on those commands. Spoiler Sure, here are some examples of commands using `rsync` and `cp` in Linux: `rsync` command: rsync -avz /path/to/source/directory /path/to/destination/directory This command will recursively copy the contents of the source directory to the destination directory, preserving the file permissions, ownerships, and timestamps. The `-a` option enables archive mode, the `-v` option enables verbose output, and the `-z` option enables compression during transfer. `cp` command: cp -r /path/to/source/directory /path/to/destination/directory This command will recursively copy the contents of the source directory to the destination directory. The `-r` option enables recursive mode, which is necessary to copy directories and their contents. Note: Be careful when using these commands, especially with `rsync`, as they can overwrite files and directories without warning. Always double-check the source and destination paths before running these commands. Hope it helps and good luck.

S
Sophatte
Junior Member
6
05-04-2023, 10:40 PM
#3
Good day, dear BoomerDutch. Thank you very much for your response and the clarification—your explanation helped a lot. I’m sure it’s related to the rights. I’ve forgotten about this, but really appreciate your help!

Best regards,
Greetings
S
Sophatte
05-04-2023, 10:40 PM #3

Good day, dear BoomerDutch. Thank you very much for your response and the clarification—your explanation helped a lot. I’m sure it’s related to the rights. I’ve forgotten about this, but really appreciate your help!

Best regards,
Greetings

H
harrycool222
Member
50
05-05-2023, 03:45 AM
#4
Hello dear @BoomerDutch, friends - I attempted the task using rsync. Do you believe I should handle it with the rsync command and also the cp command? I feel we can execute them together via sudo as root. Check this out: `ubuntu@T420s:~$ rsync -av /home/Dokumente/ disk /media/ubuntu/C449-8570/~` The error message appeared: "Command not found". Then I tried again with the same command and it still didn't work. Also, note that rsync is installed on the notebook (see below): `rsync version 3.2.7`. It comes with no warranty, so feel free to share or modify it as needed. Let me know if you need further help!
H
harrycool222
05-05-2023, 03:45 AM #4

Hello dear @BoomerDutch, friends - I attempted the task using rsync. Do you believe I should handle it with the rsync command and also the cp command? I feel we can execute them together via sudo as root. Check this out: `ubuntu@T420s:~$ rsync -av /home/Dokumente/ disk /media/ubuntu/C449-8570/~` The error message appeared: "Command not found". Then I tried again with the same command and it still didn't work. Also, note that rsync is installed on the notebook (see below): `rsync version 3.2.7`. It comes with no warranty, so feel free to share or modify it as needed. Let me know if you need further help!

V
186
05-05-2023, 12:35 PM
#5
Hi again, that's because you haven't installed the package yet. I've gotten used to distros that has rsync installed by default however in this case it wasn't so here's command to install package. sudo apt install rsync As for reason why I've mentioned on older post from chatgpt. The reason I've mentioned rsync it's because it could be faster and handy if you want keep same permissions and ownership of the files. You could see that rsync is newer version of cp command but yet both command is useful for different cases. If you can't install rsync for some reason don't forget to update and upgrade as well. Here are commands for it. sudo apt update sudo apt upgrade The update is for updating database. The upgrade is for installing newer packages. Then try again. Hope it helps.
V
victorfamosaya
05-05-2023, 12:35 PM #5

Hi again, that's because you haven't installed the package yet. I've gotten used to distros that has rsync installed by default however in this case it wasn't so here's command to install package. sudo apt install rsync As for reason why I've mentioned on older post from chatgpt. The reason I've mentioned rsync it's because it could be faster and handy if you want keep same permissions and ownership of the files. You could see that rsync is newer version of cp command but yet both command is useful for different cases. If you can't install rsync for some reason don't forget to update and upgrade as well. Here are commands for it. sudo apt update sudo apt upgrade The update is for updating database. The upgrade is for installing newer packages. Then try again. Hope it helps.

S
SOCRATOON
Junior Member
49
05-07-2023, 04:30 AM
#6
Hello and good day, @BoomerDutch. Thank you for your response; I see my updated steps. Please find the new instructions below.

I ran `sudo apt install rsync ubuntu@T420s:`
It read the package lists, built the dependency tree, and processed the information. The latest version of rsync (3.2.7-1) was installed automatically. The following packages were removed automatically and are no longer needed: grub-pc-bin, libevent-2.1-7a.

You can use `sudo apt autoremove` to delete them.
Summary of changes: 0 updates, 0 new installs, 0 removals, 1 not updated.

The rsync version is now 3.2.7-1. It was installed manually. The following items were auto-installed and can be ignored.

If you need further help, feel free to ask!
S
SOCRATOON
05-07-2023, 04:30 AM #6

Hello and good day, @BoomerDutch. Thank you for your response; I see my updated steps. Please find the new instructions below.

I ran `sudo apt install rsync ubuntu@T420s:`
It read the package lists, built the dependency tree, and processed the information. The latest version of rsync (3.2.7-1) was installed automatically. The following packages were removed automatically and are no longer needed: grub-pc-bin, libevent-2.1-7a.

You can use `sudo apt autoremove` to delete them.
Summary of changes: 0 updates, 0 new installs, 0 removals, 1 not updated.

The rsync version is now 3.2.7-1. It was installed manually. The following items were auto-installed and can be ignored.

If you need further help, feel free to ask!

T
Tinyninja120
Member
57
05-07-2023, 10:55 AM
#7
Here are the commands you requested:

- rsync -av /home/Dokumente/ /media/ubuntu/C449-8570/
- cp /home/Dokumente/* /media/ubuntu/C449-8570/
- mv /home/Dokumente/* /media/ubuntu/C449-8570/
T
Tinyninja120
05-07-2023, 10:55 AM #7

Here are the commands you requested:

- rsync -av /home/Dokumente/ /media/ubuntu/C449-8570/
- cp /home/Dokumente/* /media/ubuntu/C449-8570/
- mv /home/Dokumente/* /media/ubuntu/C449-8570/

B
boo2301
Junior Member
8
05-07-2023, 12:52 PM
#8
G day dear Boomerdutch first – thank you very much for your reply and for sharing all your excellent advice. You truly know your way of using the command line. Sorry, I mistakenly pointed you to incorrect locations; I had to adjust the paths and try a proper route: /home/ubuntu/Dokumente instead of /home/Dokumente. That didn’t work, so I used the correct one. Here’s what helped:

I tried using the `realpath` command from coreutils 8.15 – it gave me the full absolute path. You can also use `readlink` if you prefer.

Reference: https://stackoverflow.com/questions/5265...-of-a-file

This should resolve the issue you were facing. Let me know if you need more details!
B
boo2301
05-07-2023, 12:52 PM #8

G day dear Boomerdutch first – thank you very much for your reply and for sharing all your excellent advice. You truly know your way of using the command line. Sorry, I mistakenly pointed you to incorrect locations; I had to adjust the paths and try a proper route: /home/ubuntu/Dokumente instead of /home/Dokumente. That didn’t work, so I used the correct one. Here’s what helped:

I tried using the `realpath` command from coreutils 8.15 – it gave me the full absolute path. You can also use `readlink` if you prefer.

Reference: https://stackoverflow.com/questions/5265...-of-a-file

This should resolve the issue you were facing. Let me know if you need more details!