Showing posts with label minimal. Show all posts
Showing posts with label minimal. Show all posts

Sunday, April 9, 2017

Do things Command-Line way in Ubuntu - part 1

Ubuntu Commands for some useful tasks

Below some useful commands for carrying out tasks in ubuntu via the terminal are mentioned :-

  1. Resize image
  2. Resize pdf
  3. Download mp3 audio from a Youtube video
  4. Convert any video file to lossless "flac" audio format
  5. Convert any video file to "mp3" audio format
 
  • Resize image :

convert -resize 50% -quality 99 IMG_20160623_203259.jpg output.jpg

convert is in package imagemagick

===============

  • Resize pdf :

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf

If the -dPDFSETTINGS=/screen setting is too low quality to suit your needs, replace it with -dPDFSETTINGS=/ebook for better quality, but slightly larger pdfs. Delete the setting altogether for the high quality default, which you can also explicitly call for with -dPDFSETTINGS=/prepress.

source : http://askubuntu.com/questions/113544/how-can-i-reduce-the-file-size-of-a-scanned-pdf-file

Alternate : pdfsam ( The version in ubuntu respository is old , latest version at http://www.pdfsam.org/downloads/ )

============

  • Rotate pdf :

sudo apt-get install pdftk (22 MB approx.)

pdftk in.pdf cat 1-endS output out.pdf

Alternate : pdfsam ( The version in ubuntu respository is old , latest version at http://www.pdfsam.org/downloads/ )

===========

  • Youtube download as mp3

1) To install it right away for all UNIX users (Linux, OS X, etc.), type:
sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

2) If you do not have curl, you can alternatively use a recent wget:
sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

3) The command (requires ffmpeg package) : youtube-dl --prefer-ffmpeg --extract-audio --audio-format mp3 --audio-quality 0 "<video_watch_url>"

==========

  • Convert video file to lossless flac format

ffmpeg -i "input.mkv" -vn -sn -acodec flac audio.flac

==========

  • Convert video file to mp3 format

ffmpeg -i "input.mkv" -vn -sn -acodec mp3 audio.mp3

Wednesday, September 21, 2011

Installing minimal form of ubuntu

               The Minimal CD will download packages from online archives at installation time instead of providing them on the install CD itself. Downloading packages at install time reduces the size of the install CD to approximately 5 to 20MB depending on architecture (see below), as well as providing only the packages needed for installation. The download time savings achieved by using a Minimal CD can be significant, as only current packages are downloaded, so there is no need to upgrade packages immediately after installation. The Minimal CD uses a text-based installer like the Alternate CD, making the CD image as compact as possible.

                To use the Minimal CD download mini.iso from one of the following links given below and burn it to a CD.

                  To install, boot your computer from the the Minimal CD and type "cli" (command line install) at the prompt. You can then follow the instructions from the text-based installer. After the base system is installed, log in, and type "sudo tasksel" to select the system to install.

Links :
32-bit PC (x86)

Name : Ubuntu 11.04 "Natty Narwhal" Minimal CD 
Size : 19MB 
MD5 : cc1591035877c317fdef7f4ebf1662b9  SHA1:d86f78c8343009e57b0ecda14592e76802ce1ec4

64-bit PC (amd64, x86_64)

Name : Ubuntu 11.04 "Natty Narwhal" Minimal CD 
Size : 22MB 
MD5: 13507ac70863edd2df11cdd6260011ba 
SHA1: 971f67b98323f090f3609f5c7fe78478d564122d