dear community, 
this is due to the lack of knowledge and experience with the command line. I am currently pulling my hair - since a simple datatransfer from the notebook to a usb-stick does not work at propperly.
That said: therefore i need to know how to format a storage drive from the terminal.
to be frank: a very helpful thing would be to dive into all that steps - and the options for commands and to get a base knowledge that i (hopefully) am able to use to extrapolate future uses. As said above - i eagerly would like to know how to format in the different file systems such as NTFS, FAT32, EXT4 and oters more.
Background: well i have had some bad experiences since i tried to copy files from hard drive to USB flash drive in tty4 terminal?
imagine - this failed so badly: it was a truely nightmare:
i did a try with this command
this gave back the following:
and subsequently this :
but well nothing could be found on the usb-stick: i could not find and data on the usb-stick either with
okay - so i concluded to digg deeper here: as said above: a very helpful thing would be to dive into all that steps - and the options for commands and to get a base knowledge that i (hopefully) am able to use to extrapolate future uses. As said above - i eagerly would like to know how to format in the different file systems such as NTFS, FAT32, EXT4:
What if my USB stick (mounted as /media/ubuntu/sdb/) isn’t actually set up with a proper partition and filesystem, or it might be mounted read-only, which would cause errors with the rsync command...
Well - i have to say that i went through the motions but didn’t actually copy the data.
Well - i think that i have to try to figure out ....i need to break it down step by step to get that stick ready for real: i think that its worth to firstly check the drive Setup. So i think that the first step is to check what my USB stick looks like at the low level:
then i think its time for something like sdb and its partitions (e.g., sdb1, sdb2, etc.). Sometimes i only see sdb with no partitions under it, that confirms i need to partition it.
Or we can check with:
afterwards i need to have a closer look for our USB stick there (it might say /dev/sdb).
Step "partition" the Drive (i guess its needed to go forward
If our lsblk or fdisk -l shows sdb without any partitions like sdb1, i think its time to create one:
i can do that with the following step: i ll have to open the Partition Tool:
with the following
Inside fdisk:
Now i think i should see /dev/sdb1 when i run lsblk.
3.step Create a Filesystem
Assuming i ll have to see /dev/sdb1, format it with a filesystem (like ext4 or vfat but i do not need any Windows compatibility):
For ext4:
Or for vfat (FAT32) (better if we need compatibility with other systems):
4. Mount the New Partition
Now i think that i have to mount our freshly created filesystem:
and subsequently i ll have to check the contents to see if it’s empty:
now i am able to conttinue with tne next - thank god with the last step....
5. Copy the Files
Now i guess that i have done all the necessary steps to get the usb-stick ready - so subsequently our rsync command should actually work:
dear friends - can you confirm that - are these steps the right ones - so that i hopefully get it done - and am able to copy the data to the usb-stick propperly
love to hear from you

this is due to the lack of knowledge and experience with the command line. I am currently pulling my hair - since a simple datatransfer from the notebook to a usb-stick does not work at propperly.
That said: therefore i need to know how to format a storage drive from the terminal.
to be frank: a very helpful thing would be to dive into all that steps - and the options for commands and to get a base knowledge that i (hopefully) am able to use to extrapolate future uses. As said above - i eagerly would like to know how to format in the different file systems such as NTFS, FAT32, EXT4 and oters more.
Background: well i have had some bad experiences since i tried to copy files from hard drive to USB flash drive in tty4 terminal?
imagine - this failed so badly: it was a truely nightmare:
i did a try with this command
Code:
sudo rsync -av --progress /home/ubuntu/Dokumente/ /media/ubuntu/sdb/
this gave back the following:
Code:
0 100% 0,00kB/s 0:00:00 (xfr#51203, to-chk=5/59613)
Dokumente/new_literatur/theo/petra_/mirjam_0406.jpg
0 100% 0,00kB/s 0:00:00 (xfr#51204, to-chk=4/59613)
Dokumente/new_literatur/theo/petra_/mirjam_0407.jpg
0 100% 0,00kB/s 0:00:00 (xfr#51205, to-chk=3/59613)
Dokumente/new_literatur/theo/petra_/mirjam_0408.jpg
0 100% 0,00kB/s 0:00:00 (xfr#51206, to-chk=2/59613)
Dokumente/new_literatur/theo/petra_/mirjam_0409.jpg
0 100% 0,00kB/s 0:00:00 (xfr#51207, to-chk=1/59613)
Dokumente/new_literatur/theo/petra_/mirjam_0410.jpg
0 100% 0,00kB/s 0:00:00 (xfr#51208, to-chk=0/59613)
and subsequently this :
Code:
sent 4.694.015.209 bytes received 1.024.752 bytes 46.256.551,34 bytes/sec
total size is 4.688.989.106 speedup is 1,00
but well nothing could be found on the usb-stick: i could not find and data on the usb-stick either with
Code:
a. lsblk or
b. sudo fdisk -l
okay - so i concluded to digg deeper here: as said above: a very helpful thing would be to dive into all that steps - and the options for commands and to get a base knowledge that i (hopefully) am able to use to extrapolate future uses. As said above - i eagerly would like to know how to format in the different file systems such as NTFS, FAT32, EXT4:
What if my USB stick (mounted as /media/ubuntu/sdb/) isn’t actually set up with a proper partition and filesystem, or it might be mounted read-only, which would cause errors with the rsync command...
Well - i have to say that i went through the motions but didn’t actually copy the data.
Well - i think that i have to try to figure out ....i need to break it down step by step to get that stick ready for real: i think that its worth to firstly check the drive Setup. So i think that the first step is to check what my USB stick looks like at the low level:
Code:
lsblk
then i think its time for something like sdb and its partitions (e.g., sdb1, sdb2, etc.). Sometimes i only see sdb with no partitions under it, that confirms i need to partition it.
Code:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:0 1 15.2G 0 disk
└─sdb1
Or we can check with:
Code:
sudo fdisk -l
afterwards i need to have a closer look for our USB stick there (it might say /dev/sdb).
Step "partition" the Drive (i guess its needed to go forward
If our lsblk or fdisk -l shows sdb without any partitions like sdb1, i think its time to create one:
i can do that with the following step: i ll have to open the Partition Tool:
Code:
sudo fdisk /dev/sdb
with the following
Inside fdisk:
Code:
Press p → to print the current partition table (it might be empty).
Press n → to create a new partition.
Choose primary partition (default is fine).
Accept all defaults for start/end sectors.
Press w → to write the changes and exit.
Now i think i should see /dev/sdb1 when i run lsblk.
3.step Create a Filesystem
Assuming i ll have to see /dev/sdb1, format it with a filesystem (like ext4 or vfat but i do not need any Windows compatibility):
For ext4:
Code:
sudo mkfs.ext4 /dev/sdb1
Or for vfat (FAT32) (better if we need compatibility with other systems):
Code:
sudo mkfs.vfat /dev/sdb1
4. Mount the New Partition
Now i think that i have to mount our freshly created filesystem:
Code:
sudo mkdir -p /media/ubuntu/sdb
sudo mount /dev/sdb1 /media/ubuntu/sdb/
and subsequently i ll have to check the contents to see if it’s empty:
Code:
ls -al /media/ubuntu/sdb/
now i am able to conttinue with tne next - thank god with the last step....

5. Copy the Files
Now i guess that i have done all the necessary steps to get the usb-stick ready - so subsequently our rsync command should actually work:
Code:
sudo rsync -av --progress /home/ubuntu/Dokumente/ /media/ubuntu/sdb/
dear friends - can you confirm that - are these steps the right ones - so that i hopefully get it done - and am able to copy the data to the usb-stick propperly
love to hear from you
Last edited: