Naming a File in Linux

There are certain rules to follow while naming a file in Linux. There are two rules to follow:

  1. In older version of UNIX, the total number of characters in a file name is limited to 14. In most of the newer versions the total number of characters can reach up to 255 characters.
  2. Any character combination can be used to name a file, but sometimes it may cause some problem to freshers because there are certain character combinations which have special meaning in Linux. For example, ‘-t‘ used with ‘ls‘ have the power to list the files in the order of time. But if we create a file named ‘-t‘, it will be difficult to list it with name.

Another important thing is, the names are case sensitive. i.e. ‘Name’ and ‘name’ are different file names.

Files in different directories can have same name without any conflicts.

Advertisements

About Odol Shinu

I've completed my B Tech in Information Technology in 2010 from Government Engineering College Sreekrishnapuram Palakkad under Calicut University.

Posted on August 9, 2010, in GNU/Linux. Bookmark the permalink. 2 Comments.

  1. Total number of characters in a name limited to 14?

    Did you verify this? Try.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: