Create filelist to merge
ls *.avi | while read each; do echo "file '$each'" >> mylist.txt; done
use ffmpeg to concatenate files.
ffmpeg -f concat -i mylist.txt -c copy video_draft.avi
search text in file
find /path/to/folder -type f -exec grep -H "search_term" {} \;
show all dirs & files with size and sort by size
du -sh | sort -n
find files bigger than 20M
find . -type f -size +20M
awk
find all not matching (EXACT!!!) "#" and copy to new file
awk '$0!="#"' config >> config_clean
find all mathing/not matching PATTERN
awk '/#/' config
awk '!/#/' config
expand to 1:1 aspect ratio and resize
magick input.png -gravity center -background none -extent 145 -resize 128 output.png
create icon from file
magick code-logo.png -define icon:auto-resize=128,64,48,32,16 code-logo.ico
convert to avif
magick input.png -define heic:speed=2 output.avif
convert to base64 (for POwerBI background
magick input.png -define jpeg:extent=500kb - | base64 > output.txt
resize with adding transparent
magick input.png -resize 1280x720 -background none -gravity center -extent 1280x720 output.png
resize with additional padding from top
magick input.png -resize 1280x1390 -background none -gravity north -extent 1280x1440 output.png
get image dimensions
magick identify -format "%wx%h\n" yourfilename.png
log in on A as user a and generate a pair of authentication keys. all commands from a@A:~>
ssh-keygen -t rsa
create a directory ~/.ssh as user b on B.
ssh b@B mkdir -p .ssh
append a's new public key to b@B:.ssh/authorized_keys:
cat .ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys'
ln -s /path/to/file /path/to/symlink
create
sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
change/remove
sudo swapoff /swapfile
sudo rm /swapfile
check
free -h
pdftk - extract pages from .pdf
pdftk <input_filename> cat 25-26 <output_filename>