Download password protected file over shell

Therefore we use wget: wget -O outputfile.txt –user sheldon –ask-password https://ask-sheldon.com/genius-stuff.html # f.e. REST wget –http-user USER –http-password PASSWOR http://ask-sheldon.com/import.txt # HTACCESS protection If you let -O param out the output will be stored under its original name.

Shred files – securely delete files, folders or partitions

To shred files or partitions securely: $> shred -vun <loops> <File1> <File2> $> shred -vzn <loops> <Device> loop is the count of the loop beginning with 0 (3 means 4-times)!!! You can get the partition table as described in List of partitions or List, partitioning and format drives. If you want to shred a directory recursively, you […]

Export image file statistics to csv

To get a CSV export of all image files with name, last access date, last change date, last modification date and filesize in byte in a folder including all subfolders, you can use this linux command: $> find . -regex “.*\.\(jpg\|gif\|png\|jpeg\)” -type f -printf “%p,%AY-%Am-%AdT%AT,%CY-%Cm-%CdT%CT,%TY-%Tm-%TdT%TT,%s\n” > filestat_data_20141201.csv or separated by tabs: $> find . -regex […]

Sync files with rsync

To sync filesystems over ssh (with port): $> rsync -azvu –exclude-from=’./exclude.txt’ -e ‘ssh -p 26 -o StrictHostKeyChecking=no’ user@host:/PATH/TOREMOTE/FILE/ORFOLDER/ /PATH/TO/LOKAL/FILEORFOLDER; Useful parameters -o StrictHostKeyChecking=no –  tells the the source host to accept the ssh-key from the destination host –exclude-from=’./exclude.txt’ – in exclude.txt each line specifies a path to ignore through synchronization –dry-run – only simulate what would have been […]

Compress and extract files

With tar On Unix based plattforms you can use the tar command for file compression and also for later uncompression. Compression $> tar -pczf web.tar.gz web/ With -h as the first parameter the real files instead symbolic links are compressed. So you can tar symbolic link targets. To exclude files or folder, you can define –exclude=’fileOFolderPath’ directly […]