Being new to Linux/Apache (and enjoying it so much more than Windows "servers") I am curious to know how many files can be stored in one directory?

Also, does the fetching of file suffer when you have thousands of files in one directory?

In a linked question, how many directories can you place in one directory?

I intend to use the feedback to decide on whether to use database or flat files for a project. Should be around 5 different files * 5000 variations. >> 25,000 files or 5,000 directories with 5 files each. (or possibly some other combination).

Incidentally, these files will be 1 gif and 4 text/html files. All called from one script.

Thanks

    Don't. Use a database.

    I don't know about the maximum number of files within a directory, but I do know about a maximum number of files (inodes) the filesystem can handle!

    Type
    df -i
    to see how many more files you can make on every partition.

    Besides that: If you need more than 2 files, you should start using a database.

      Thanks, df -i reports I have space for over 4 million files (freespace is nearly 35GšŸ˜Ž, should be enough for a bit of text!

      Incidentally, I'm new to SSH on a linux box (or any *nix commands), does anyone know a good site that lists useful commands in an easy to understand way?

        Write a Reply...