This dd command will help you to backup large file/partition etc etc. Use with care! Stolen off stackoverflow (credits to the guy(s) who answered)
** I am still struggling to merge those split files into one huge file. If you have answer, post it to message boards
tar --extract --verbose --file=
dd if=/dev/sdX status=progress obs=1024 conv=noerror,sync | gzip -1 -c | split -b 1GB -
above command will rip a partition, probably huge partition into small gz. files of 1Gb in size, therefore, think before you copy & paste
tar --create --file
*before running 2nd command, set following variable:
export SIZE=du -sk <folder_with_multiple_files>/ | cut -f -1
tar --create --verbose -f -
sed:
following command will add a text at the start of a line
sed 's/
e.g: sed 's/^this_is_example.file.ext.*$/Yes, &/'
& = to stop before start of the string
sed -e 's/^
-e allows you to chain one or more sed commands together
Note to self: If you are unsure of the flags used in the command(s), refer man pages, stackoverflow, stackexchange, superuser,serverfault, digitalocean,vultr, linoxide.
mkfs (copied off GParted) mkfs.fat -F32 -v -l -n '128GB ''/dev/sdX'
aforementioned command will format your {flash,usb,thumb,pen} drive into FAT32 partitioned drive. You will need to create an empty partition before using that mkfs command.
time curl --location --basic --compressed --get --data-binary --ipv4 --no-keepalive --raw --progress-bar --max-filesize
time curl --location-trusted --compressed --get --data-binary --ipv4 --proto https --ssl --tlsv1.2 --no-keepalive --tcp-nodelay --raw --progress-bar --max-filesize 1671430144 <>|dd of=/dev/sdb bs=4096 count=1671430144 conv=noerror,sync oflag=dsync status=progress #################################################################### 100.0%
408064+0 records in 408064+0 records out 1671430144 bytes (1.7 GB, 1.6 GiB) copied, 4602.7 s, 363 kB/s
real 76m43.237s user 0m18.636s sys 0m15.988s
Special Mention to our friend(s) at nixcraft/freebsd_handbook for his/her/their dedication
Thank You.
reference: https://stackoverflow.com/questions/24230117/how-to-add-a-before-any-line-containing-a-matching-pattern-in-bash
https://stackoverflow.com/questions/8005114/fast-concatenation-of-multiple-gzip-files
https://serverfault.com/questions/402588/combine-two-or-more-compressed-files
https://stackoverflow.com/questions/8005114/fast-concatenation-of-multiple-gzip-files
https://serverfault.com/questions/144411/how-do-i-see-du-in-gb-instead-of-mb-in-linux
https://superuser.com/questions/168749/is-there-a-way-to-see-any-tar-progress-per-file
https://robots.thoughtbot.com/input-output-redirection-in-the-shell