A directory, also commonly called a folder, is a filesystem object used for organizing files and other directories.

learn more… | top users | synonyms (3)

56
votes
22answers
20k views

rm on a directory with millions of files

Background: physical server, about two years old, 7200-RPM SATA drives connected to a 3Ware RAID card, ext3 FS mounted noatime and data=ordered, not under crazy load, kernel 2.6.18-92.1.22.el5, uptime ...
29
votes
6answers
9k views

Meaning of directories on Unix and Unix like systems

I've been using Linux for a couple of years now but I still haven't figured out what the origin or meaning of some the directory names are on Unix and Unix like systems. E.g. what does etc stand for ...
1
vote
2answers
666 views

revert chmod 777 / -R

while executing a command i made a mistake and executed (ubuntu 10) sudo chmod 777 / -R # okay you may laugh now all my filesystem has 777 permitions , obviously i dont know which ...
22
votes
6answers
7k views

Should websites live in /var/ or /usr/ according to recommended usage?

According to a guide on the Linux directory structure, /usr/ is for application files, and /var/ is for files that change (I assume this means "files that belong to the applications"). Is this ...
15
votes
5answers
25k views

How do I find (or exclude) all directories and sub-directories matching a certain pattern (in Linux)?

I'm trying to use the Linux find command to find all directories and sub-directories that do not have .svn (Subversion hidden folders) in their path. I can only get it to exclude the actual .svn ...
8
votes
1answer
7k views

Changing MySQL data directory in Ubuntu Server 10.04

I was getting the following error when trying to change the data directory in ubuntu server 10.04. 100809 19:33:00 [Note] Plugin 'FEDERATED' is disabled. /usr/sbin/mysqld: Can't find file: ...
7
votes
7answers
1k views

Different files of two directories

There are two directories I'd like to compare. I tried diff but it includes the changes inside the files. All I want is something like this file a is just in /A file b is missing in /A file c ...
1
vote
1answer
602 views

Can I have two (or more) Apache VirtualHosts separated by subdirectories?

I think this is a simple question, but let me explain better. I have the following development environment: Ubuntu Server 12.04 LTS; Apache 2.4; PHP 5.5; Everything is working fine, except the ...
7
votes
3answers
6k views

compare 2 directories and copy differences in a 3rd directory

Running ubuntu 12.04, I want to compare 2 directories, say folder1/ and folder2/ and copy any files that are different to folder3/. There are also nested files, so matching subdirectories should be ...
3
votes
2answers
3k views

How do I configure IIS 7 (discount asp.net) to point subdomains at application subdirectories?

I have an discount asp.net account, which uses IIS 7 and I want to configure subdomains to point at specific applications on the site. For instance: 's1.site.com' would run the application at ...
6
votes
1answer
2k views

Is the Apache Directory directive supposed to be relative to the DocumentRoot or not?

Is the Apache Directory directive supposed to be relative to the DocumentRoot or not? I ask in the context of a VirtualHost, but it shouldn't make any difference. In other words, is it supposed to ...
0
votes
2answers
80 views

Powershell script to display all groups and their users

I'm currently trying to write a script that displays each group and user in the domain. Import-Module ActiveDirectory $Groups = (Get-AdGroup -filter * | Where {$_.name -like "**"} | select ...
0
votes
3answers
1k views

500 error after dragging joomla website out of subdirectory

I recently dragged a website I built with joomla out of a subdirectory and now the whole website just shows a 500 internal error, can't even log into the backend. I've already tried changing the log ...
0
votes
3answers
979 views

FTP -> VSFTPD -> allow uploading folders

I have a Fedora FTP server that uses VSFTPD. I wanted to know how I could allow the users to upload directories and make directories. Thanks in advance.
-2
votes
1answer
74 views

Update Application on Shared Folder [closed]

I am trying to find a good way to implement updating an application on a shared folder. If there is an update to the program I need to uninstall and reinstall the program on the shared folder. What ...
22
votes
2answers
15k views

logrotating files in a directories and its subdirectories

Is it possible to get logrotate to consider logfiles in a directory and all its subdirectories? (i.e. without explicitly listing the subdirectories.)
8
votes
9answers
10k views

How to solve linux subdirectories number limit?

I have a website which will store user profile images. Each image is stored in a directory (Linux) specific to the user. Currently I have a customer base of 30+, which means I will have 30+ folders. ...
19
votes
3answers
24k views

What is the maximum number of files a file system can contain?

Given the current structure of a directory entry on a ext4 file system on Ubuntu, what is the maximum number of files a file system can contain? What is the general method of calculating the maximum ...
11
votes
2answers
8k views

What Are The Best Practices For Business Folder Structure?

We've tended in the past towards having departmental folders (Sales, Marketing, etc) on a single share and then adding folders below these ad-hoc as and when they're needed. It's gotten a bit messy - ...
5
votes
1answer
602 views

how to pre-create directories on linux for file storage

looking for a way to pre-create directories on linux to be used to store a large number of files. We will be generating file ids using a GUID - I need to keep a copy of these files on a linux web ...
3
votes
6answers
654 views

Need to check a directory tree for changes every 10 seconds and run a script if it is changed

I have a directory that has many folders with code inside it, and I need to run a script to rsync changes over to a couple other servers. I have that script written and working fine, but I cannot ...
3
votes
6answers
10k views

Best method to track folder size growth over time?

I have a file server that has a pretty large folder tree. There's a shared folder, under that are 5 departmental folders. Nested inside of those are thousands of subfolders and files. I would like ...
2
votes
6answers
28k views

Unable to remove Read-Only attribute from folder in Windows XP

I have this directory which I cannot remove the read only attribute from. The computer is running XP SP2 (or SP3, not sure) and the directory sits in a NTFS file system. Looking into the web I found ...
1
vote
2answers
3k views

Combine several locations with regex in nginx

I dynamic number of Joomla installations in subfolders of the domain. For example: http://site/joomla_1/ http://site/joomla_2/ http://site/joomla_3/ ... Currently I have the ...
0
votes
3answers
2k views

Moving mysql datadir not working? Problems with symlink in conf.d?

I wanted to have my mysql config in svn to be versionised so i did thefollowing: ubuntu@ip-10-226-50-211:~/mysql-config$ ls -la /etc/mysql/conf.d/ total 12 drwxr-xr-x 2 root root 4096 2011-01-27 ...
3
votes
3answers
3k views

Apache VirtualHost Proxy with a Subdirectory

Currently, we have an IIS server as our primary web server. We are implementing an Apache server in its place, but still need to have the IIS server accessible. Typically, this is a simple thing, ...
1
vote
1answer
1k views

How to rewrite URI from root if file exists in folder?

I have a public folder in my document root. I would like to redirect all the files that are not present in document root, but are present in the public folder. (So if the same file is in two places, ...
1
vote
1answer
785 views

What are the maximum number of files/directories allowed per directory in common Linux FS?

It is known that ext2/ext3 FS have a rather low limit of about 32k files/directories per directory. It looks like ReiserFS is limited in practice by the r5 hash function which allows about 1 200 000 ...
1
vote
1answer
98 views

du -sh keeps timing out!

i need to get the entire size of /storage, but using du -sh times out after about an hour! is there another way to get the entire directory size?
1
vote
6answers
1k views

Delete files from directory: memory exhausted

This question is a logical continuation of http://serverfault.com/questions/45245/how-can-i-delete-all-files-from-a-directory-when-it-reports-argument-list-too-lo I have drwxr-xr-x 2 doreshkin ...
0
votes
2answers
2k views

Change the document root of a parked domain?

I have run into a problem which is that my web host doesn't appear offer addon domains. I currently have a domain name pointing to my name servers. I went into cPanel to add an addon domain that ...
0
votes
2answers
2k views

Running two independent tomcats on one machine, instead of one tomcat with multiple instances

due to operational need following is the scenario. Two applications running on one machine, operating system is Windows 2003 standard server edition. Application A comes packaged with tomcat ...