This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ar vx your-package.deb data.tar.gz | |
| sudo tar xzvf data.tar.gz -C / |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| qpdf --password=passwd --decrypt orig.pdf decrypted.pdf | |
| #To input the password | |
| read -s -p "Password: " password && qpdf --password=$password --decrypt orig.pdf decrypted.pdf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NR!=1 {a[$NF]++; total++;} | |
| END { | |
| for (i in a) | |
| printf("Field %2d: %3d (%3.2f\%)\n", i, a[i], a[i]/total*100); | |
| printf ("Total: %d\n", total) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| myisamchk -rq --sort_buffer_size=512M --tmpdir=/home/fubar/tmp/ /var/mysql/data/database/table.MYI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mysqldump -u root <DB-name-here> -d --skip-add-drop-database --skip-add-drop-table | sed -e 's/AUTO_INCREMENT=[[:digit:]]* //' > <sql-output-file.sql> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for i in `find . -name "*~"`; do orig=`echo $i | sed -e s/~$//`; if [[ -f $orig && $orig -nt $i ]]; then rm $i; fi; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for i in `cat <dir-and-file-list>`; do rsync -av $i <dest-dir>; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-get -qqy --print-uris <upgrade | install pkgname> | awk -F "'" '{print $2}' >> deb-list.txt | |
| wget -bc -i deb-list.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT | |
| SUBSTRING( REPLACE( REPLACE( URL, 'https://', ''), 'http://', ''), 1, LOCATE('/', REPLACE(REPLACE(URL, 'https://', ''), 'http://', '')) - 1) as domain, | |
| COUNT(*) | |
| FROM urlData | |
| GROUP BY domain |