You need to have pv
installed.
Command:
tar -cf - [Source directory] -P | pv -s $(du -sb [Source dir] | awk '{print $1}') | gzip > [Dest tar.gz file]
Example:
tar -cf - dir/ -P | pv -s $(du -sb dir/ | awk '{print $1}') | gzip > file.tar.gz
You need to have pv
installed.
Command:
tar -cf - [Source directory] -P | pv -s $(du -sb [Source dir] | awk '{print $1}') | gzip > [Dest tar.gz file]
Example:
tar -cf - dir/ -P | pv -s $(du -sb dir/ | awk '{print $1}') | gzip > file.tar.gz
#!/usr/bin/env bash | |
#This script backups selected databases in local MySQL server | |
#REQUIREMENTS | |
##mysqldump gzip | |
##mysql database has no root password. This script uses 'root' MySQL user without password as no 'root' password is set. | |
##This is not good practice. User with more restrictive permission should be used. | |
#set database user |
/* open up chrome dev tools (Menu > More tools > Developer tools) | |
* go to network tab, refresh the page, wait for images to load (on some sites you may have to scroll down to the images for them to start loading) | |
* right click/ctrl click on any entry in the network log, select Copy > Copy All as HAR | |
* open up JS console and enter: var har = [paste] | |
* (pasting could take a while if there's a lot of requests) | |
* paste the following JS code into the console | |
* copy the output, paste into a text file | |
* open up a terminal in same directory as text file, then: wget -i [that file] | |
*/ |