Questions tagged [directory]

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

Filter by
Sorted by
Tagged with
123 votes
24 answers
66k 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 ...
BMDan's user avatar
  • 7,259
146 votes
7 answers
57k 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 ...
Luke's user avatar
  • 3,826
1 vote
2 answers
4k 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 ...
user70247's user avatar
  • 125
69 votes
7 answers
25k 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 ...
Nick Bolton's user avatar
  • 5,136
19 votes
5 answers
33k 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 ...
Jason Down's user avatar
85 votes
4 answers
106k 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.)
ithinkihaveacat's user avatar
46 votes
3 answers
92k 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 ...
user avatar
15 votes
4 answers
65k 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, ...
Jerbot's user avatar
  • 394
10 votes
10 answers
16k 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. ...
Nanda Kishore's user avatar
7 votes
7 answers
2k 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 ...
Wienczny's user avatar
  • 1,153
4 votes
2 answers
72k views

Copy a folder and all contents using group policy preferences?

I have used Group Policy Preferences to copy files to client computers many times. I can't figure out if it is possible to copy a single folder (including contents) to a client computer. Am I just ...
William Jackson's user avatar
4 votes
1 answer
4k views

Hide Total Size and Free Space on Network Drives

I would like to know if there is a way, preferably through Group Policy, that one can hide the total size listing and the free space listing on network drives. We have an active directory environment ...
John's user avatar
  • 2,276
0 votes
2 answers
653 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 ...
Steve's user avatar
  • 41
-1 votes
2 answers
2k views

Removing the content of a directory recursively [closed]

I want to delete the content of a folder without deleting a folder: all files and all sub folders with sub files. This doesn't delete anything sudo rm -rf /folder1/* Why not? How to get it to work?
Raj's user avatar
  • 129
113 votes
1 answer
146k views

What is the purpose of the ".well-known"-folder?

If've found a new error message in our log files and would like to know, for what this .well_known folder is used for. Which application/client would need to access such a folder and which ...
Sascha's user avatar
  • 1,254
61 votes
3 answers
242k views

Mount Remote CIFS/SMB Share as a Folder not a Drive Letter

Is there any way to mount a remote CIFS/SMB/SAMBA share as a folder/directory and not as a drive letter. For example, I want this map: \\Server\ShareName -> C:\Folder\ShareName Instead of the usual ...
Anagoge's user avatar
  • 713
50 votes
14 answers
62k views

Linux - What directories should I exclude when backing up a server?

I'm backing up a Linux server and storing it on another server. I began with a simple rsync -aPh --del server.example.com:/ /mnt/backup Then someone pointed out that I shouldn't back up /proc, ...
Amandasaurus's user avatar
  • 31.9k
45 votes
2 answers
137k views

Difference between <Location> and <Directory> Apache directives

I have Zend Server installed and noticed something like the following was added to my httpd.conf file: <Location /ZendServer> Order Allow,Deny Allow from 127.0.0.1 </Location> Alias /...
rfgamaral's user avatar
  • 960
36 votes
3 answers
40k 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 ...
periklis's user avatar
  • 421
29 votes
3 answers
227k views

Cannot delete folder with rm -rf. Error: device or resource busy

I'm trying to delete /var/www/html but I'm getting this error: rm: cannot remove `html': Device or resource busy
Hugo's user avatar
  • 291
16 votes
3 answers
50k views

Is there a hard limit to the number of files a directory can have? [duplicate]

Wondering if there is a limit to the number of files that can be stored inside a directory, in CentOS 6. There is one particular directory which could potentially have millions of subdirectories. ...
Juan Carlos Coto's user avatar
14 votes
6 answers
36k 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 ...
Aszurom's user avatar
  • 463
12 votes
2 answers
24k 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 - ...
jidl's user avatar
  • 151
9 votes
1 answer
11k 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: './mysql/...
7 votes
1 answer
12k views

How to disable apache logging when accessing certain directories?

How do I get apache to prevent http requests from being logged on a directory basis? I want to do something alike <IfModule mod_userdir.c> UserDir public_html <Directory /home/*/...
nidi's user avatar
  • 200
6 votes
1 answer
969 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 ...
Erik Sorensen's user avatar
5 votes
3 answers
6k views

nginx: redirect subfolder to subdomain

I'm trying to redirect a subfolder to a subdomain in nginx. I want http://example.com/~meow/ to be redirected to http://meow.example.com/. I tried the following: location ~ ^/\~meow/(.*)$ { ...
mrm8's user avatar
  • 65
4 votes
1 answer
2k views

How can a file moved to a directory with GID-bit set inherit the group ownership

Problem I know that a file that is created in a directory with the GID-bit set it will inherit the diretory's group ownership. This however doesn't work for files that are moved to that directory as ...
Jdz's user avatar
  • 43
4 votes
2 answers
5k 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 ...
Patrick Allaert's user avatar
3 votes
2 answers
7k views

nginx sub directory wildcard rewrite

I have set up a server block on my nginx server, e.g. with domain testsite.com. I want to be able to install separate WordPress installations into direct child folders of the root folders, e.g. /var/...
physalis's user avatar
  • 145
3 votes
2 answers
5k views

Dovecot: Email clients and duplicated folders

So in my server I'm usually going against a problem, different emails clients call some special folders like Sent and Trash different names like Sent Items and Deleted Items. My question is, can I in ...
TCB13's user avatar
  • 1,218
3 votes
2 answers
29k views

How to restrict deletion of a folder on NTFS share, but still allow modify access within folder

I am setting up a set of scan folders from a scanning copier device, and would like to know the best way to protect the folders (for each department) from moving or deletion, but yet still allow ...
thinkdreams's user avatar
3 votes
3 answers
581 views

What is the minimum action required in order to have access to a newly authorized server folder

I hope I'm at the right place (right stack exchange website). If not please tell me the right one. I got new rights on a folder on a Windows server by being added to Active Directory Group for which ...
Eric Ouellet's user avatar
3 votes
6 answers
1k 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 ...
Mike's user avatar
  • 31
2 votes
1 answer
5k 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, ...
kissgyorgy's user avatar
2 votes
6 answers
42k 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 ...
elcuco's user avatar
  • 367
2 votes
3 answers
15k views

delete all folders with tmp in name using batch file

Have tried to google this, but I always seem to get results relating to .tmp files, which isnt really any use. I have only a basic understanding of batch files, but I think I need something like this:...
James Edmonds's user avatar
1 vote
1 answer
2k views

nginx + fpm + subdirectory

I have an nginx config that looks like this: location ^~ /movies { alias /var/dp.cx/movies/current/public; fastcgi_index index.php; try_files $uri /movies/index.php; location ~* \....
Glen Solsberry's user avatar
1 vote
1 answer
676 views

Apache Reverse Proxy | Wildcard directory rerouting (.htaccess)

How would it be possible to have a wildcard directory proxy? I have gotten the basics but the issue is, it gives out the directory which I'm in, my htaccess file: RewriteEngine on RewriteCond %{...
George Tsatsis's user avatar
1 vote
6 answers
2k views

Delete files from directory: memory exhausted

This question is a logical continuation of How can I delete all files from a directory when it reports "Argument list too long" I have drwxr-xr-x 2 doreshkin doreshkin 198291456 Apr 6 21:...
codeholic's user avatar
  • 134
1 vote
2 answers
1k views

Status of replication support in ApacheDS?

The features page indicates they're expecting to support multi-master replication "soon". Does it have any basic master-slave replication yet or does it currently not support any form of replication?
Brad Mace's user avatar
  • 1,024
1 vote
2 answers
4k 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 ...
Alex Netkachov's user avatar
1 vote
1 answer
453 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?
Andrew Fashion's user avatar
1 vote
1 answer
3k views

Nginx Password Protect Entire Port Number 8081

I'm trying to password protect an entire port on my website--https://domain.com:8081 and http://domain.com:8081 I have tried editing /etc/nginx/sites-enabled/domain.com.vhost by adding the following ...
Pamela's user avatar
  • 187
1 vote
2 answers
4k 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 ...
user77996's user avatar
  • 113
1 vote
4 answers
370 views

Can someone explain a bit about Unix folder permissions and safety?

Why would I change folder permissions to 755 or 777 for example? I read that it means read write and execute but what I want to know, can anyone steal php codes depending on these permissions? Thank ...
Darius's user avatar
  • 335
0 votes
2 answers
5k 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 (...
user avatar