Some Useful terminal commands

Playing Video through terminal command. Select any of the player you have. I have tried with mplayer and vlc. If you don’t have just install it using ubuntu Software center. Then go to the folder which contain your videos or songs. And run following command :

mplayer a.flv

or for vlc player

vlc a.flv

Command line video cutter For making the short clips out of a video, run following command on terminal.

ffmpeg -ss 00:00:34 -t 00:00:63 -i abc.avi -vcodec copy -acodec copy clip.mp4

where 00:00:34 is the starting time and 00:00:63 is end time of format hh:mm:ss. Here abc.flv is the video with which you want to make a clip.

Opening a Website on terminal For opening the website in terminal itself, use the command:

lynx [website name]

eg :


If you want to open a website on browser using the command line,  then :

[browser-name][website name]



Convert PDF to JPG   

Run the command :

convert -density 300 file.pdf files.jpg

300 for 300 Dpi image.

Make your terminal speak  Run the command :Opening .odt file using Command line

espeak "hello"

Here in the place of hello put anything you want your terminal to speak

Opening .odt file using Command line We can open an odt file with a terminal command as

 $ soffice abc.odt

 Converting Video from mp4 to mpeg :

$ffmpeg -i input.mp4 output.mpeg
ffmpeg -i input-file.flv -acodec copy -vcodec copy output-file.mp4

Listing latest 10 files :

$ ls -lrt | tail

Remove files older than 10 days :

$find . -m +10 | xargs -i rm -f {}

Move all the log files in current directory to backup: 

$for i in *.log; do; mv $i backup/; done

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s