Sunday, April 19, 2015

OPEN TEXT OR IMAGE OR VIDEO FILES VIA TERMINAL IN LINUX

Hi There!


Have you ever thought of how to open Text or Image or Video files in Linux OS via Terminal (Command Line Interface)?


If you know, then you are the best.

If you aren't, you are not bad. Come, Let us know about that.


Open Terminal.

Go to the path where the respective file exits.
For ex 'jeevagan@jeeva-pc:/home/iprotecs/Videos' (where I tried here to open a video file)

Type 'xdg-open Facebook.mp4' and hit Enter. (where Facebook.mp4 is a filename here)

This will open the entered file name with the default video playing application.

If you want to open that video file via VLC player, install the VLC player first and then go to the path where the video file exits and type 

# vlc "Facebook.mp4"

 and hit Enter.

That's it. xdg-open will open the file with default application, where 'application <"Filename.extension"> will open the file with our own desired format.

Thanks,

Jeevagan Nagarajan.