..... yes, the basic linux filesystem has file permissions..... not file extensions... to determine if a file is an executable..... this is far safer than extensions as you are beginning to find out..... you probably are coming from a MSWindow's background and need to learn more about the improved security of linux....
it probably is getting crazy for you, if you are running a dual boot with linux and windows..... then you will start seeing files from the Windows OS, that seem marked executable, or vice versa... or you do alot of double-clicking on icons and expect the system to do what you want".. :-)
.... the way it works on linux is:
....you instruct your shell to execute a program, and regardless of it's name it will see if its marked as executable by you or your group..... if it is...it tries to execute it.... but if you try to execute a jpg or bmp.... it won't run....and will just return an error...... and then there are the shebang lines :-)....... maybe read linux programming... and the Rute User's Guide
...that brings us to default programs and apps which will properly load your file....its a part of your system setup....ubuntu uses the Gnome Desktop to determine file types thru a MIME-information setup..... first look for extension....then check type with a file-like command
...this is all getting to the point of you needing to read up on linux....it isn't a Perl problem
...see monitor suid and world writtable files for an example of checking perms.....
....also on ubuntu....try installing the program Midnight Commander, go thru it's menus and see what info is tracked on files
I have many images saved without extensions ... and it works that way.
...sure it does..... but that is because the Ubuntu Desktop handles it all for you..... as a matter of fact, your only problem may be that you have a destop setting set to hide file extensions, like they do on Winblows
why don't you right-click on those images and get the info?...... are you trying to automatically rename something like the browser's cache of images? :-) which are named like numbers?
..... you need to learn how Desktops work...... it's actually a program that has MIME type records built in..... go see MIME modules for Perl
In reply to Re^3: Answer: How do I find the type of an image?
by zentara
in thread How do I find the type of an image?
by ahmad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |