answersLogoWhite

0


Best Answer

The maximum length of a directory name or file name is affected by the location itself.

The maximum length of the path to a file on a modern Operating System is 255 characters.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Directory names and file names can be how many characters long?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How long is long file names?

260 characters


How long can the path file length from home in Linux be?

Starting from /home, the path may include up to 4,091 additional characters (that is, Linux supports 4096 characters for the path, with up to 256 characters per file or directory name). This is a limitation of the kernel, and not of the file system. It is technically possible to modify the Linux kernel to support even longer file and path names if a user needed to do so.


What are acceptable file names?

It depends on the file systems supported by the operating system. Most file systems use the concept of files and directories (or folders) to access data stored on a device. File names and directory names usually follow the same naming conventions on a given system. Every file and directory has a set of attribute bits (flags) associated with it and one of those attributes is the directory bit. If the bit is set, the name refers to a directory otherwise the name refers to a file.On the older MS-DOS FAT file system, file and directory names are limited to 8 characters for the base name and 3 for the extension, commonly referred to as an 8.3 file name. The dot separator is considered part of the file name, thus file names are limited to a maximum of 12 characters. The newer Windows FAT and NTFS file systems support longer file names, but in order to retain backward compatibility with the older FAT system, file names that do not conform to the 8.3 file naming convention are automatically given a second short file name that does conform. Such files can therefore be referred to by either name. For example, the "C:\Program Files" folder can be referred to as "C:\PROGRA~1". Note that any file name with a space character is considered a long file name because the 8.3 naming convention does not support space characters.You may use any characters in the current code page for a name, including Unicode characters and characters in the extended character set (128-255), except for the following characters:< (less than)> (greater than): (colon)" (double quote)/ (forward slash)\ (backslash)| (vertical bar or pipe)? (question mark)* (asterisk)In addition, the following restrictions apply:Integer value zero, sometimes referred to as the ASCII NUL character.Characters whose integer representations are in the range from 1 through 31, except for alternate data streams where these characters are allowed.Any other character that the target file system does not allow.The following names are also reserved and cannot be used to name a file or directory:CONPRNAUXNULCOM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8 and COM9LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9Note that although the newer FAT and NTFS file systems allow mixed-case file names, they are not case-sensitive by default. That is, "TEMP", "Temp" and "temp" all refer to the same file or directory. However, when searching for files, you can use case-sensitivity to filter out unwanted files. For example, searching for "T*" with case-sensitivity turned on will find only those files that begin with a capital 'T'.Under the newer FAT and NTFS system, the Windows API imposes a maximum length of a fully-qualified path to 260 characters including the terminating null character. Given a fully-qualified path name is of the form volume:\component(s), the maximum length for any one component (file or directory name) is 256 characters. However, the Windows API also supports Unicode versions which permit extended-length paths of up to 32,767 characters with a maximum component length of 255 characters. To specify an extended-length path, use the "\\?" prefix. For example, "\\?\D:\very long path".Note that the shell and the file system have different requirements thus it is possible to create a path using the Windows API that the shell user interface is not able to interpret correctly.


How long can the total path to a particular file be in Linux from root directory?

4096


How you display the premission for a file or directory?

Use the 'ls' command with the '-l' (long listing) option


How do you display permissions for a file or directory?

Use the 'ls' command with the '-l' (long listing) option


What is a file name and how long it is name should be?

A filename is simply a unique identifier for any file... It used to be limited to 11 characters plus a three character extension (for example computer.com) - Advances in programming now allows over 200 characters in a file name.


How do you display the permissions for a file or directory?

Use the 'ls' command with the long listing option: ls -l


In access how long can table names be?

64 characters.


A file name can have a maximum of how many characters?

AnswerAssuming you are using the NTFS file system (this is likely if you are running Windows XP, to find out for sure go to "My computer", right-click on your main hard drive, likely "C:" and click properties, the annotation next to "File System" is your answer) then the maximum number of characters in a file name is 256. Keep in mind however that if your computer hides file extensions (such as the ".exe", ".doc", etc.) those still count towards your 256 maximum (i.e. if you have a program named "test" on your desktop it would appear to only contain four characters, but in reality the full file name is "test.exe" therefore taking up a total of eight characters. The maximum is 256


Which character is not allowed in a long file name?

Following characters are not allowed in the file name (Separated by comma). /, \, ?, %, *, :, |, ", &lt; and &gt;


What are the rules to create file DOS?

- File name should be 8 characters long - Extentions are optional