LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-17-2012, 03:03 PM   #1
mattjjs
LQ Newbie
 
Registered: Jul 2012
Posts: 16

Rep: Reputation: Disabled
how to show file extensions


Hi ,

sorry if this is a stupid question but is there a way to show the file extensions for files within a certain directory?

Many Thanks,

Matt
 
Old 07-17-2012, 03:07 PM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,882

Rep: Reputation: 2910Reputation: 2910Reputation: 2910Reputation: 2910Reputation: 2910Reputation: 2910Reputation: 2910Reputation: 2910Reputation: 2910Reputation: 2910Reputation: 2910
sure, there is a way, for example ls will show it to you, also gnome commander can do that. But actually you need to say what program are you using....
 
Old 07-17-2012, 03:09 PM   #3
mattjjs
LQ Newbie
 
Registered: Jul 2012
Posts: 16

Original Poster
Rep: Reputation: Disabled
hey sorry im using centos 6.2,

thanks again.
 
Old 07-17-2012, 03:10 PM   #4
kbscores
Member
 
Registered: Oct 2011
Location: USA
Distribution: Red Hat
Posts: 259
Blog Entries: 9

Rep: Reputation: 32
File extensions should already show. Like if you are looking for .jar file it will say .jar if you ls the directory. Linux doesn't hide file extensions like Windows does or at least Red Hat doesn't.

You can see what type of file it is by using -F. It will put a symbol or in the case of a plain file it will put nothing.
@ - symbolic link
\ - directory
* - executable

or if you do a long listing on a directory you will see on the permissions whether it is directory or not. ls -l
 
Old 07-17-2012, 03:30 PM   #5
Lachek
LQ Newbie
 
Registered: Jan 2005
Posts: 5

Rep: Reputation: 1
What file manager are you using to view the files? Previous answers have focused on viewing directory listings using the 'ls' command in the shell ("Terminal"), but you may be using Metacity or some other file manager. If you're using stock CentOS 6.2 you're probably running the Gnome 2.28 window manager which comes with Metacity as the default file manager. Metacity should show file extensions by default, though. Can you double-check and clarify what file manager you're using?
 
Old 07-17-2012, 09:47 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 12,866
Blog Entries: 18

Rep: Reputation: 3339Reputation: 3339Reputation: 3339Reputation: 3339Reputation: 3339Reputation: 3339Reputation: 3339Reputation: 3339Reputation: 3339Reputation: 3339Reputation: 3339
Also, if you are looking in a directory containing executable files, such as /usr/bin, note that executable files in Linux normally have no file extensions.
 
Old 07-18-2012, 03:12 AM   #7
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,564

Rep: Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901
Depending on how new to linux you are, the question you are asking may be a little more left of centre if you are only used to Windows. As stated by frankbell above, linux is not driven
by file extensions like Windows is. In fact file extensions are used mainly by humans to know what data is in a file and not by the system. (not sure if that helps at all)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Convert all file extensions in one directory to another file extension shayno90 Linux - Newbie 19 03-02-2012 02:14 PM
[SOLVED] Adding file extensions to listings in a txt file mrjawz Linux - Newbie 5 02-15-2012 09:53 AM
Need help with File Extensions Linux nooB 454 Linux - Newbie 3 04-10-2005 06:41 PM
File Extensions!!! rejeK Linux - Software 5 12-20-2004 08:30 PM
File Extensions RpgActioN Slackware 1 09-22-2004 11:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration