Posted by TedH (TedH), 16 November 2006Hi Graham, just an out of interest guestion. I use .txt files to store the database for each month's entry on my blog. Can I use .db instead or is that reserved for stuff like MYSQL?
If I can, it would make searching my archive folders a whole bunch easier as all I'd need to look for are .db files.
cheers - Ted
Posted by admin (Graham Ellis), 16 November 2006Not sure what OS you're using, but typically the actual extension letters won't make much of a difference ... and they certainly won't make any difference to Perl. By all means use a different extension to distinguish the special format files
Posted by TedH (TedH), 16 November 2006Server is Linux(Unix)/Apache. I heard that Unix allows me to 'invent' extensions - but I've always been a bit leary of that.
I know I can have them on my PC's local testbed server and they're treated as text files. But once online I'm not really sure what the Unix is gonna think of it.
Posted by Custard (Custard), 16 November 2006Hi.
Unix really won't care what you call your file.
To unix, all letters(*) in a filename are equal, and the extension means nothing. It's humans who like the extensions so they can tell at a glance what may be inside the file.
In unix, use 'file <filename>' to see what it thinks is in the file (**)
If you are serving the files from Apache however, take a look at the conf/mime.types file. This tells the browser via the webserver what to do with a file based on its name.
So name your files however you like but try not to confuse yourself when you expect one type of data in a file with another name
(*) With the possible exception of files that start with a '.'. These files are normal files, but do not appear in normal directory listings. You need to specify ls -a to see them. But for all other purposes they are normal files too.
(**) It does this by looking up 'magic' numbers. See man magic(4)
Posted by TedH (TedH), 16 November 2006Hi Custard, thanks.
Locally my mime file I can see, but my online server may be a different matter. Good TS though, so they'll help me on that.
cheers - Ted
See you Geekmas?
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: email@example.com • WEB: http://www.wellho.net • SKYPE: wellho