What Are The Rules for Linux File Names?
Note: Don't use asterisks, backslashes, or question marks in Linux file names--these characters have special meaning to the shell and could cause your commands to do something quite different from what you intended. Also avoid using a dash as the first character of a file name, since most Linux commands will treat it as a switch.
Files starting with a dot are hidden files. They behave just like any other file, except that the ls (list files) command will not display them unless you explicitly request it to do so. Your .profile file is an example of a hidden file.
Also remember that Linux file names are case sensitive, which can be difficult to get used to if you have a DOS background. Linux allows you to have unique files named goodstuff, GOODSTUFF, and GoodStuff in the same directory.
It's best to always use lowercase in Linux unless you can think of a good reason to use uppercase or mixed case. Most Unix people use lowercase almost exclusively, but aside from this "cultural" point, there's another good reason to use lowercase. If you're sharing or accessing a DOS file system with Linux, DOS will not be able to see the files that have uppercase or mixed-case file names.
Unlike under DOS, the dot character (.) has no special meaning. You're not limited to the eight dot three (xxxxxxxx.yyy) style of naming because Linux treats the dot just like any other character; you can name a file Some.Yummy.CHEESECAKE.Recipes if you're so inclined.
Along these lines, Linux executables do not need or use a special extension such as .exe or .bat. Linux will happily run a program file named zippity just as readily as it will run DOODAH.EXE.
And here's another slight difference between Linux and DOS filesystems. Linux uses the forward slash (/) in path names, and DOS uses the backslash (\). Don't blame this little quirk on Linux though . . . the DOS filesystem was originally modeled after Unix! In fact, the popular rumor is that Bill Gates and Company implemented the DOS filesystem just differently enough from the Unix filesystem to avoid being criticized for stealing the idea. The same charge is made about the DOS batch file (.BAT) utility, since it bears striking similarities to the Unix shell scripting languages, but I digress. . . .
Comments - most recent first
(Please feel free to answer questions posted by others!)
I have happy to learn Linux from your advising website how do i access to online to Linux server to do the used all Linux command's
Please advise me
Thank's & Regard's
all linux servers are only in text mode, and u r using RHEL server 5.
if you want to use GUI then you have to transfer to "RHEL desktop" edition
I loaded windows 7 onto C drive and would like to put Linux onto D drive. Would someone remind me on how I could go about this. I did it sometime back with windows XP and Linux suse 5. It was as easy as 123.
Its proving to be a challenge this time around
Thanks for this great site.
"Programming the world wide web 4th edition by Robert W.Sebesta"
I am trying to have this simple script run by cron... It's basically a dump file of my MySQL database... The problem is, though the output file gets successfully created, I cannot ftp it to my local directory. Upon inspection, I notice a ^M character at the end of the filename...
What I did was to use mv command to copy/move the contents of the same file (but this time, minus the ^M characters at the end) to the same filename... It works fine... However, I was wondering if say, I include the same mv command on the script, will it work - or mv will work but it will also append ^M characters to the end of the new output file??
NO SPAM! If you post garbage, it will be deleted, and you will be banned.
Copyright © by -
All rights reserved - Redistribution is allowed only with permission.