The tag has no wiki summary.

learn more… | top users | synonyms

52
votes
22answers
17k 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 ...
25
votes
6answers
8k 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 ...
22
votes
5answers
6k 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 ...
21
votes
3answers
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?
19
votes
2answers
16k 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?
19
votes
2answers
10k 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 ...
18
votes
6answers
5k 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 ...
18
votes
10answers
13k views

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

I'm backing up a linux server and storing it on some other server. I started off with a simple rsync -aPh --del server.example.com:/ /mnt/backup Then someone pointed out that I shouldn't back up ...
17
votes
3answers
21k 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 ...
15
votes
4answers
15k 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 ...
14
votes
5answers
24k 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 ...
14
votes
3answers
582 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 ...
12
votes
4answers
12k views

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

I'm about to install "leiningen" which is a bash script for the clojure programming language with a lot of usefulness... ...but I'm not sure where it is appropriate to -put- a executable script in ...
11
votes
4answers
25k 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?
10
votes
5answers
284 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 ...
10
votes
2answers
5k 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?
10
votes
3answers
5k views

Hosted LDAP Services

Are there any enterprise-grade services for externally hosted LDAP used for authenticating users in our company? Internally, we have many development and test servers that have system users locally ...
9
votes
2answers
3k 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 ...
8
votes
9answers
9k 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. ...
8
votes
2answers
131 views

Is there a good summary somewhere of what should go in each of the main folders in a linux install?

eg bin, sbin, proc, lib, boot, usr, etc... Is there a standard list somewhere, does it depend on the distro? This is essentially to answer the common question I have "I'm installing X or putting Y ...
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 ...
7
votes
3answers
3k 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 ...
7
votes
3answers
4k views

Un-tar a specific directory inside of a tar

I have the Wordpress tar, latest.tar.gz. Within it is the following structure /wordpress/dirtories/files When I do the following command I would prefer if I could have it unpack starting at ...
7
votes
5answers
4k 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 ...
7
votes
4answers
9k 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 ...
6
votes
5answers
11k 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 ...
6
votes
3answers
3k views

Fast way of knowing real directory size on linux/bsd

What is the fastest way of computing real directory size? I somehow catch myself needing that a lot. Simply doing: # du -hs /dir Is too slow. Is there any service I could run which would ...
6
votes
4answers
234 views

Frequently accessed files and I/O usage

I'm curious, from a performance standpoint, is there an advantage in storing all files in one directory versus having each file in a separate directory? I'm not concerned about organization. Also, ...
5
votes
11answers
59k 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 ...
5
votes
4answers
5k 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 the permissions are automatically created. What should the permissions (NTFS) be for the actual folder that the home ...
5
votes
8answers
2k views

Linux Recursive Delete Keeping The First Dir

First question here, I'm usually on StackOverflow. I need to delete all the contents of a directory, but not the directory itself as I don't have permission to delete that actual directory. This ...
5
votes
2answers
713 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 ...
5
votes
3answers
3k views

Duplicate Directory with SSH

How can i duplicate a directory on my server via ssh?
5
votes
2answers
992 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 ...
5
votes
3answers
4k 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 ...
5
votes
1answer
5k 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 ...
5
votes
3answers
122 views

directories with two one dot (.) entries

I'm trying to clean up my lost and found, and I've managed to remove most things, but I'm left with "almost" empty directories, like: lost+found/#14042862: total 1324 dr---wx--- 2 76040 43010 ...
5
votes
1answer
9k 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 ...
5
votes
1answer
939 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 ...
5
votes
2answers
13k views

How do you use SCP to copy a deep directory?

I need to copy a deep directory on one windows machine over 'itself' on another windows machine. I can't seem to get the command to work correctly. The current problem is that it appears that scp is ...
4
votes
7answers
17k 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 ...
4
votes
3answers
2k 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. ...
4
votes
4answers
8k views

How to minimize Windows Server 2008 R2 size?

Is there a guide somewhere on how to minimize the Windows Server 2008 R2 installation folder? I am talking specifically about all the features and roles that come with the Windows Server 2008 R2 ...
4
votes
2answers
1k views

How to create union of two directories?

In case of unix/linux, is there a way to create union of two directories without copying or linking manually everything to a single directory?
4
votes
3answers
156 views

System to use to maintain a corporate directory

I work for a small-but-growing startup that needs a corporate directory to keep photos and contact info for the company. Eventually we'd like to maybe use this system for login credentials and the ...
4
votes
3answers
2k views

On linux, what does it mean when a directory has size 0 instead of 4096?

Here's a strange thing I haven't seen before -- a directory whose size is reported by ls as 0 instead of 4096, and I can't create any files within it. # ls -ld lib home drwxr-xr-x. 2 root root 0 ...
4
votes
2answers
200 views

How to compact large directories

Is there a way to compact a very large directory under EXT2/EXT3 without simply remaking the directory? I recall that perlfunc cautions that the OS implementations of seekdir and telldir run the risk ...
4
votes
1answer
471 views

Delete a directory with pipe (|) in its name?

Without booting to Linux, how do you delete a directory that was created in Linux on an NTFS partition that contains a pipe in the file name? For example: ...
4
votes
2answers
804 views

Account management tools supporting self-service registration and email verification?

I work in a university environment that has in the past offered services almost exclusively to university affiliates who already have "formal" accounts in central user database. We are increasingly ...
3
votes
2answers
1k views

Force apache to server different directories on different ports?

For example, say I have my htdocs in: ~/public_html and those documents are being served on port 80. Is there any way to make apache server documents in: ~/public_html/something on a different ...