move to https://app.heptabase.com/w/3c34815462d03f458145e38c717b14fa2bd49792af07deb2f0127f6247111801?id=74470eaa-83da-461e-ad44-545255f89e03 (2023-05-23)
Files & Directory
count number of files
$ find [PATH] -type f | wc -l
delete thumb files
find . -name ".DS_Store" -delete
find . -type f -name '._*' -delete
find . -type f -not -name '._*' -size -5k
other
find . -size -5k -type f
find number of files in each folder
du -a | cut -d/ -f2 | sort | uniq -c | sort -nr
via https://stackoverflow.com/a/39622947/644070
batch process
replace character
replace line-break (\n
) to ,
tr '\n' ',' < source-file
delete character
tr -d `\n` < source-file
mix and combination
conver mp3
find *.wav -exec ffmpeg -i {} {}.mp3 \;
Dist utilities
test HD Performance
Use the dd command to measure server throughput (write speed):
dd if=/dev/zero of=/tmp/test1.img bs=1G count=1 oflag=dsync
Linux and Unix Test Disk I/O Performance With dd Command - nixCraft
Top comments (0)