Wednesday, February 20, 2019
Sunday, August 5, 2018
Rsync recursively transfer one or multiple directory to another
rsync -avhP --progress Movies TV /mnt/sdc5/media
-a copy archive bits
-v verbose
-h human readable
-P copy partial + progress
Saturday, March 10, 2018
Delete Windows files from old drive (Windows 10)
Windows 10
takeown /F "D:\Program Files.old\" /A /R /D Y
cacls "D:\Program Files.old\*.*" /T /grant administrators:F
rmdir /s /q "D:\Program Files.old\"
takeown /F "D:\Program Files.old\" /A /R /D Y
cacls "D:\Program Files.old\*.*" /T /grant administrators:F
rmdir /s /q "D:\Program Files.old\"
Wednesday, December 6, 2017
Monday, November 13, 2017
Find and delete files
Find par2 files starting from current dir, and print the results of the find
find . -type f -name "*.par2" -print
Find par2 files starting from current dir, and forcibly remove (rm -f)
find . -type f -name "*.par2" -exec rm -f {} \;
Wednesday, November 1, 2017
vsftpd default file permissions (default umask)
For default permissions of 644
local_enable=YES
write_enable=YES
local_umask=0022
file_open_mode=0777
anonymous_enable=NO
anon_upload_enable=YES
anon_mkdir_write_enable=YES
local_enable=YES
write_enable=YES
local_umask=0022
file_open_mode=0777
anonymous_enable=NO
anon_upload_enable=YES
anon_mkdir_write_enable=YES
From http://wintelguy.com/umask-calc.pl
File Mode Creation Mask / umask Calculator
| Mask | Files (requested permissions 666) | Directories (requested permissions 777) |
| 000 | 666 (rw-rw-rw-) | 777 (rwxrwxrwx) |
| 002 | 664 (rw-rw-r--) | 775 (rwxrwxr-x) |
| 007 | 660 (rw-rw----) | 770 (rwxrwx---) |
| 022 | 644 (rw-r--r--) | 755 (rwxr-xr-x) |
| 027 | 640 (rw-r-----) | 750 (rwxr-x---) |
| 077 | 600 (rw-------) | 700 (rwx------) |
| 277 | 400 (r--------) | 500 (r-x------) |
Chmod files, not directories
File files only, starting in the current directory, executing chmod 644 on the found files, including files with spaces and starting with -
[user@localhost ]# sudo find . -type f -exec chmod 644 -- {} +
Subscribe to:
Posts (Atom)
