Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: View file extensions

  1. #1
    Join Date
    May 2009
    Beans
    15

    View file extensions

    Hello,

    In windows, I know how to select the option to view the file extensions...for example:

    blank >> blank.txt

    But where can you select this option in ubuntu?

    Thank you

  2. #2
    Join Date
    May 2008
    Location
    The Netherlands
    Beans
    2,150
    Distro
    Kubuntu 12.10 Quantal Quetzal

    Re: View file extensions

    Quote Originally Posted by jpfalet View Post
    Hello,

    In windows, I know how to select the option to view the file extensions...for example:

    blank >> blank.txt

    But where can you select this option in ubuntu?

    Thank you
    You want to turn them of? Here they are standard on which makes it easier to know which file is which.
    DeMus

  3. #3
    Join Date
    May 2007
    Beans
    853
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: View file extensions

    many files don't actually have extensions.

    they don't serve a purpose in linux except to tell the user what kind of file they are
    The box said that I needed to have Windows 98 or better... so I installed Linux
    Need help with shell commands? click
    Need MORE help with shell commands? advanced click

  4. #4
    Join Date
    May 2009
    Beans
    15

    Re: View file extensions

    Quote Originally Posted by Tyke91 View Post
    many files don't actually have extensions.

    they don't serve a purpose in linux except to tell the user what kind of file they are
    Oh really? Why is that?

  5. #5
    Join Date
    May 2007
    Beans
    853
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: View file extensions

    what a file does is decided by what it contains. Usually the first few bits of a file give information about what it actually is. The extension is just so that humans can easily tell what it does (for instance, .rc is usually a configuration text file)


    another example. I could write a short script, foo
    Code:
    #!/usr/bin/python
    print "This script prints a string"
    and save it with no extension, the extension for python (.py) or even .pl (perl) or .odt

    if i were to call that script from the command line
    Code:
    ./foo
    or
    ./foo.py
    or
    ./foo.pl
    or
    ./foo.odt
    depending on what its name is
    it would always do the same thing.

    for example. you have a file in your home folder called ".bashrc" the '.' in front makes it a hidden file and it has no extension. This file is used to tell bash what aliases to use and other global definitions.
    Last edited by Tyke91; June 26th, 2009 at 07:19 PM.
    The box said that I needed to have Windows 98 or better... so I installed Linux
    Need help with shell commands? click
    Need MORE help with shell commands? advanced click

  6. #6
    Join Date
    May 2009
    Beans
    15

    Re: View file extensions

    I see, so is that why I do not see an extension when I create a text file?

  7. #7
    Join Date
    May 2007
    Beans
    853
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: View file extensions

    yep. it doesn't have one unless you give it one.
    The box said that I needed to have Windows 98 or better... so I installed Linux
    Need help with shell commands? click
    Need MORE help with shell commands? advanced click

  8. #8
    Join Date
    May 2009
    Beans
    15

    Re: View file extensions

    And to give it an extension, is it as simple as just writing the extension directly with the file name? After I press "rename", can I just write "blank.extension"? Or do I need to give it its extension through a command in the terminal?

  9. #9
    Join Date
    May 2007
    Beans
    853
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: View file extensions

    an extension is just part of the name. Sometimes they are useful (for instance, the text editor vim can use the extension of a file to determine how to highlight it)

    rename will work fine.
    The box said that I needed to have Windows 98 or better... so I installed Linux
    Need help with shell commands? click
    Need MORE help with shell commands? advanced click

  10. #10
    Join Date
    May 2009
    Beans
    15

    Re: View file extensions

    Ok, and finally, talking about vim, I wanted to know if vim surpasses gedit (which comes with ubuntu).

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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