Today I will come with some useful commands for your Linux. Some commands need to be installed into your Linux, like ImageMagick.
With ImageMagick software you can generate an animated GIF:
1 | convert -delay 120 -loop 0 *.png animated.gif |
This command of ImageMagick will resize to 50% all your png files from your folder:
1 | for img in 'ls *.png'; do convert $img -filter bessel -resize 50% processed-$img; done; |
Use this command to put top command output into a log file and read the firefox process with a number of rows after that:
1 2 | $ top -bn 5 >>top.log $ cat -n top.log | grep -A 6 'firefox' |
See the first files eating out your space:
1 | du -hsx * | sort -rh | head -7 |
Store the output into the value of command who:
1 | $ CURRENT_USERS=$(who) |
Store the output of command file into value and then show the result:
1 2 3 | $ FILES=`find . -type f -print | wc -l` $ echo "$FILES" 2111 |