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
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
131 votes
9 answers
175k views

How to copy file preserving directory path in Linux?

I have Eclipse projects and ".project" file in them, the directory structure looks like 'myProject/.project'. I want to copy these '.project' files to another directory, but I want the enclosing ...
dhblah's user avatar
  • 1,413
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
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
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
80 votes
4 answers
52k views

How to keep the full path with rsync?

When backing up with rsync, How do I keep the full directory structure? For example, the remote server is saturn, and I want to backup saturn's /home/udi/files/pictures to a local directory named ...
Adam Matan's user avatar
  • 13.4k
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
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
50 votes
3 answers
52k views

Add directory structure to SVN, without files

Is there a way to add a directory structure to an SVN repository without adding the files contained in the folders?
fresskoma's user avatar
  • 1,343
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
45 votes
13 answers
186k views

How do you handle "CMD does not support UNC paths as current directories"?

I am attempting to change directories to a file server such as: cd \\someServer\\someStuff\ However, I get the following error: CMD does not support UNC paths as current directories What are ...
Ray's user avatar
  • 730
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
41 votes
5 answers
31k views

What do these abbreviations stand for?

Some directories are easy to understand the meaning /usr /bin ... But for the next ones, I have no idea. /etc /opt opt for optional? etc for electronic t...... configuration (no idea for t) I ...
Luc M's user avatar
  • 3,220
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
35 votes
5 answers
48k views

Where is a good permanent place to install custom Bash scripts?

I'm about to install Leiningen which is a useful Bash script for the Clojure programming language. The problem is, I'm not sure where it is appropriate to put a executable script in the Linux system ...
Kzqai's user avatar
  • 1,288
32 votes
5 answers
91k views

How to upload a directory recursively to an FTP server by just using ftp or lftp?

I am writing a Linux shell script to copy a local directory to a remote server (removing any existing files). Local server: ftp and lftp commands are available, no ncftp or any graphical tools. ...
Nicolas Raoul's user avatar
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
28 votes
13 answers
209k views

Windows command prompt: how to get the count of all files in current directory?

What command would you use in cmd.exe to find the number of files in the current directory? Is there a powershell option here? Update: I was hoping to avoid dir, as I know there are 10,000+ files in ...
p.campbell's user avatar
  • 4,407
28 votes
2 answers
13k views

Difference and correct usage for /tmp and /var/tmp

I haven't put much thought into this until now, but it seems odd that there is a /var/tmp and /tmp directories for most of the linux distros I routinely use (Ubuntu, Centos, Redhat). Is there any ...
David's user avatar
  • 409
22 votes
3 answers
2k views

Why should you run cd . before doing anything?

In this compilation of sysadmin horrors, one of the authors writes, as a rule of thumb: Always do a cd . before doing anything. Why would you want to do that?
qdii's user avatar
  • 335
22 votes
4 answers
180k views

How can I set full premissions to a user in a specified dir?

How can I set full permissions to a user in a specified dir in linux?
Alon Gubkin's user avatar
21 votes
8 answers
91k views

Search for just folders in Windows Explorer

Is there a way to search in Windows Explorer for just folders? I know folders get sorted to the top, but I'm always looking for that extra option.
MathewC's user avatar
  • 6,987
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
18 votes
4 answers
4k views

Ensuring a repeatable directory ordering in linux

I run a hosted continuous integration company, and we run our customers' code on Linux. Each time we run the code, we run it in a separate virtual machine. A frequent problem that arises is that a ...
Paul Biggar's user avatar
18 votes
5 answers
102k views

Why can't I cd into a directory?

I am running Ubuntu 10.04.2 LTS. Why I can't I cd into the /var/www directory? david@ubuntu:/var$ pwd /var david@ubuntu:/var$ ls -l drwxrwxr-- 13 root root 4096 2011-02-26 21:53 www david@ubuntu:/...
davidjhp's user avatar
  • 700
17 votes
5 answers
16k views

Difference between Azure tenant and directory

Are Azure "tenant" and "directory" different things, or different names for the same thing? According to the documentation, a tenant is a container within Azure associated with a company or group of ...
Jerome Smith's user avatar
17 votes
4 answers
41k views

Windows Service: Can I configure the current working directory?

By default, Windows services start in the sytem32 directory (usually C:\WINDOWS\system32). Is there a way to set up a different working directory? I am thinking of some registry parameter beneath ...
Tomalak's user avatar
  • 1,605
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
16 votes
2 answers
11k views

What is the difference between /usr/local/bin & /usr/local/sbin

I wrote a simple script which I want to share with my colleagues. Should it be in /usr/local/bin or /usr/local/sbin? What is the typical usage for these directories?
Jérôme Kerviel's user avatar
16 votes
1 answer
15k 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 be:...
Jeff's user avatar
  • 1,426
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
15 votes
3 answers
34k views

Good default for XDG_RUNTIME_DIR?

The XDG Base Directory Specification is a very interesting spec for user directories. It also provides good default values, except for XDG_RUNTIME_DIR. Now I am writing a software that needs to ...
cadrian's user avatar
  • 1,315
15 votes
4 answers
40k views

Can't access windows share when in security group assigned to share

I'm a bit stumpped on this one. I created a security group in AD called "special data users" and add myself to it. I then created a share on a server and give that AD security group full access to ...
Alan Barber's user avatar
15 votes
2 answers
6k views

How can I list the content of a zip archive, but only the first level?

I have a big zip file and I want to know what it's contain. I know I can run: zipinfo file.zip but the output is too verbose and there are a lot of files in the sub-directories. I want to see a ...
Sapir's user avatar
  • 153
14 votes
2 answers
18k views

Apache2 - 301 Redirect when missing "/" at the end of directory in the url

I haven't really noticed this Redirect(301) when requesting a url like this without slash("/") at the end: http://server/directory The server will respone with a 301 Redirect Permanent header with a ...
Jonathan Gurebo'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
13 votes
3 answers
8k views

Shrink/reset directory size?

Is there a way to shrink a directory entry? My dovecot maildir directories have increased in size from the default 4096 to several megs, and it is messing with disk quotas. The only way that I have ...
mikewaters's user avatar
  • 1,195
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
12 votes
2 answers
27k views

Reverse proxy for a subdirectory in nginx

I want to set up a Reverse proxy on my VPS for my Heroku app (http://lovemaple.heroku.com) So if I visit mysite.com/blog I can get the content in http://lovemaple.heroku.com I followed the ...
Maple's user avatar
  • 121
11 votes
3 answers
15k views

Duplicate Directory with SSH

How can i duplicate a directory on my server via ssh?
tarnfeld's user avatar
  • 471
11 votes
2 answers
20k views

Where to put www directory on Ubuntu?

I'm a bit scared to ask this because I got so many negative votes for simply asking a question last time, but here goes; Where in the Linux (Ubuntu) directory structure is it 'normal' to put public ...
Nigel Alderton's user avatar
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
10 votes
5 answers
407 views

How do I change to the directory I just moved that file to?

So lets assume I've just done: mv ./myfile /to/some/other/place/ And I now decide I want to follow the file, and go into that directory. Whilst I could head for the mouse, select the text, type 'cd ...
Peter Boughton's user avatar
9 votes
4 answers
48k views

NTFS Permissions for root share that houses Home Directories Windows Server 2008 R2

I am using the AD Profile Tab to Auto create Home Directories at \\server\home, so that the permissions are automatically created. What should the NTFS permissions be for the actual folder that the ...
Gregg's user avatar
  • 93
9 votes
6 answers
78k views

How delete the content of a directory in Centos

I need to delete all the content of a folder in CentOS but not the folder itself. For example: I have a folder named "MYFOLDER" which contains subfolders FOLD_1, FOLD_2, FOLD_3, FOLD_4... etc , and ...
verofairy's user avatar
  • 103
9 votes
7 answers
38k views

Check to see if a directory exists remotely (shell script)

Is there a way to see if a directory exists on a remote server? Perhaps there's a better way, but I'm writing an application deployment script, and I want to create a directory on a remote server if ...
user avatar
9 votes
5 answers
136k views

Allow subdirectory with Apache

I feel like this is a fairly simple fix and have seen similar problems when searching but haven't been able to fix it with those solutions. Basically the problem is I cannot access any subdirectories ...
Danny's user avatar
  • 161
9 votes
1 answer
7k views

Directory inside or outside VirtualHosts?

Is there a difference between putting Directory tags inside or outside VirtualHosts? I found a configuration file that has several VirtualHosts all with the same Directory tag inside, and the same ...
Pablo Fernandez's user avatar
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/...

1
2 3 4 5
14