Skip to main content

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
147 votes
7 answers
59k 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,856
134 votes
9 answers
184k 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,443
123 votes
24 answers
69k 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,279
116 votes
1 answer
153k 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,284
85 votes
4 answers
111k 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
54k 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.7k
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,156
62 votes
3 answers
245k 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
  • 723
52 votes
14 answers
64k 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
  • 32.5k
50 votes
3 answers
53k 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
49 votes
2 answers
143k 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
  • 1,010
47 votes
13 answers
195k 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
  • 748
46 votes
3 answers
93k 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
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,380
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
95k 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
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
30 votes
13 answers
216k 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,427
29 votes
3 answers
234k 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
29 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
  • 419
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
8 answers
101k 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
  • 7,017
22 votes
4 answers
182k 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
19 votes
5 answers
34k 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
111k 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
  • 710
17 votes
3 answers
51k 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
17 votes
2 answers
12k 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
17 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
  • 173
17 votes
5 answers
17k 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
16 votes
3 answers
36k 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,335
16 votes
4 answers
43k 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,595
16 votes
1 answer
16k 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,436
15 votes
4 answers
68k 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
4 answers
42k 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
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
37k 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,215
13 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
  • 131
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
  • 251
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
21k 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
17k 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
409 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
39k 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
140k 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
3 answers
13k views

IMAP standard folder names - "Junk" or "Spam"

I am configuring spamassassin at the moment and have been wondering what is the standard (or atleast most used and recognized by most clients) folder name for Spam or Junk? I first used Spam, but ...
Zulakis's user avatar
  • 4,293
9 votes
1 answer
8k 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

1
2 3 4 5
14