Search This Blog

Compress sparse files preserving their holes

use -S option for tar
tar -Sczvf sparse_file.tar.gz sparse_file

Find FIFO (named pipe) in Linux

 find ./ -type p 

Find sparse files in Linux

find ./ -type f -printf "%S\t%p\n" | awk '$1 < 1.0 {print}'

find ./ -type f -printf "%S\t%p\n" | awk '$1 < 1.0 {print $2}'



To find and remove the sparse files:
find ./ -type f -printf "%S\t%p\n" | awk '$1 < 1.0 {print $2}' | xargs rm -f



To find and compress the sparse files:
find ./ -type f -printf "%S\t%p\n" | awk '$1 < 1.0 {print $2}' | xargs -I {} sh -c "tar -Sczvf {}.tar.gz {}; rm -f {}"



Excel custom formatting cells for file sizes (GB and TB)


[<1000000]0.00," KB";[<1000000000]0.00,," MB";0.00,,," GB"
[<1000000000]0.00,," MB";[<1000000000000]0.0,,," GB";0.0,,,," TB"

SSH public key authentication rejected with debug message: no mutual signature algorithm

ssh user@remote-server -vvvv
debug1: no mutual signature algorithm



Cause

The RSA SHA-1 hash algorithm is being quickly deprecated across operating systems and SSH clients because of various security vulnerabilities, with many of these technologies now outright denying the use of this algorithm.

Solution

Generate SSH key using ED25519 algorithm:
ssh-keygen -t ed25519



See also