Find the answer to your Linux question:
Results 1 to 8 of 8
Say I have a .png file and I didn't know which program I had to type to use it what could I do to find out?...
  1. #1
    Just Joined!
    Join Date
    Mar 2011
    Posts
    10

    Opening a file without knowing the name of the program?

    Say I have a .png file and I didn't know which program I had to type to use it what could I do to find out?

  2. #2
    Just Joined!
    Join Date
    May 2006
    Location
    Silver Spring, MD
    Posts
    32
    Obviously, with an extension you already know what type of file it is and therefore will know what program you need to open it. However, if there is a file without a file extension, your only hope is if it has some metadata in the file. You can view the file in a file manager, such as thunar and it should recognize it. Otherwise, you're SOL.

    HTH,

    KaBar's Edge

  3. #3
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568

    Question

    Quote Originally Posted by raybetts89 View Post
    Say I have a .png file and I didn't know which program I had to type to use it what could I do to find out?
    I don't understand your requirement. Could you please explain it ? What are you trying to achieve?
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

  4. #4
    Linux Newbie Nagarjuna's Avatar
    Join Date
    Feb 2011
    Posts
    122
    In situations like this, I find using a search engine like Google is your best bet. I would just search something like, "linux view .png files" and you'd likely get some pretty good results.
    Last edited by Nagarjuna; 03-16-2011 at 06:17 PM. Reason: Misread Original Post

  5. #5
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    You can use file command to determine what type of file it is.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  6. #6
    Just Joined!
    Join Date
    Mar 2011
    Posts
    10
    I don't understand your requirement. Could you please explain it ? What are you trying to achieve?
    Let's say that in the shell I come across a file and the ending is unfamiliar, is there any way I can check for a list of programs that will be able to open it?

  7. #7
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    In linux the ending or file extension is not usually required. As devils casper said, using the file command is probably the best way and then google if you're still unsure.

    Program associations with files in linux are set using mime types.

  8. #8
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568
    Yes,I agree with devils casper and reed9. Use "file" command to determine the file type.
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •