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 |
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....
|
hey sorry im using centos 6.2,
thanks again. |
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 |
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?
|
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.
|
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) |
All times are GMT -5. The time now is 07:52 PM. |