Convert HTML to image
Answer:
Firstly, you need to install html2ps
# sudo apt-get install html2ps
Then install the ImageMagick
# sudo apt-get install imagemagick
Finally run the command:
# convert -density 72 input.html output.png
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
Convert HTML to image
Answer:
Firstly, you need to install html2ps
# sudo apt-get install html2ps
Then install the ImageMagick
# sudo apt-get install imagemagick
Finally run the command:
# convert -density 72 input.html output.png
How to perform checksum on a folder?
Answer:
Previous article told you how perform checksum on a file. How about to perform checksum on a folder?
A simple solution is to install md5deep
# sudo apt-get install md5deep
To perform checksum on a particular folder (input),
# md5deep -l -r input
26ab0db90d72e28ad0ba1e22ee510510 input/2.txt
6d7fce9fee471194aa8b5b6e47267f03 input/3.txt
b026324c6904b2a9cb4b88d6d61c81d1 input/1.txt
That's so easy.
Reference: http://md5deep.sourceforge.net/
wget with rate limiting
Answer:
When you are downloading a large file, and you want to limit the bandwidth used, it is easy with the wget command
wget --limit-rate=100k http://www.example.com/file.zip
The above command will limit the rate to be used not to exceed 100kbps.
Serve current directory using HTTP with a single command
Answer:
Sometimes, you want to share some files in a given directory in your Linux system to other people, you might consider setup a NFS, Samba, FTP or so.
However, the easiest method is to export the directory using HTTP, with the help of Python.
E.g.
# cd /data/
python -m SimpleHTTPServer
Serving HTTP on 0.0.0.0 port 8000 ...
Now people can access the web server at port 8000 of your system's IP address, to access the /data directory.
Visual Shell for Linux
Answer:
GNU Midnight Commander is a directory browser/file manager for Unix-like operating systems, you can use it to browser shell, ftp, tar and more.
To install in Ubuntu,
# sudo apt-get install mc
Reference: