4
votes
2answers
96 views

Copy directory tree without empty directories?

I have the following tree # upper letters = directory # lower letters = files A |-- B |-- C |-- D |-- e <= file |-- F |-- G I need to copy this tree to another destination, ...
3
votes
3answers
203 views

Cleaning up junk and logs on unix/linux

I manage some unix systems, and users on my system are creating a lot of junk and littering their work areas. I am running into filesystem full every day. There are many terabytes locked up and is ...
1
vote
0answers
85 views

In linux and solaris, what is the UUID based off of?

If you run dmidecode|grep UUID you are given a "globally unique string of characters" which can be used for licensing purposes. In linux, the format is usually something like this: ...
0
votes
1answer
53 views

Changing symlink when a program is running, any side effect?

We have a custom program (test) to use the following structure, e.g. myapp myapp\version1\ myapp\version1\test myapp\version1\logs\.. myapp\version2\test myapp\version2\logs\.. myapp\running ...
2
votes
3answers
90 views

Detect file update from modification time

Is there a way to see how often a file is being updated? I mean I need to see if the modification time of a file is updated in a dynamic way (same as tail shows if the file is updated in a dynamic ...
0
votes
1answer
102 views

make backup of file when user run rm -f [closed]

Here is the scenario; I need to authorize a user to do activity in /opt/dev-folder/. Developer makes frequent changes in file, some time they replaced or remove original file. I have assigned ...
1
vote
1answer
198 views

/var/lib for holding served data, why?

Acording to the FHS, the directories /lib and /usr/lib are both for libraries (libraries used in /sbin and user libraries, respectively). But what about the /var/lib folder? Following the same logic ...
3
votes
4answers
1k views

What character can be safely used for naming files on unix/linux?

Before yesterday, I used only lower case letters, numbers, dot (.) and underscore(_) for directories and file naming. Today I would like to start using more special characters. Which ones are safe ...
1
vote
2answers
175 views

“failed to open stream: Too many open files” and garbage collection

Whilst writing some unit tests I hit the upper limit for too many open files (Debian VM) - "failed to open stream: Too many open files" Other than a restart, is there any way to clear this block? ...
1
vote
2answers
151 views

Should I be worry about max number of files in a folder in *NIX filesystems?

In a social networking project we want to store user's avatars in a folder. I think in one year or two it'll reach to 140K (I've seen this issue before and it will be around this number). I want to ...
1
vote
1answer
52 views

missing symbolic link

I have two directories with multiple directories and files Lets say that directory A has some symbolic links to other directories and files and directory B is missing them. What can I do to copy those ...
1
vote
1answer
405 views

Folder default ACLs not inherited when new file is created

I'm a bit of a beginner with Unix systems, but I'm running Cygwin on my Windows Server, and I am trying to figure out something related to extended ACLs. I have a directory to which I set the ...
0
votes
2answers
326 views

Bizarre, unremovable ghost file in linux following server crash

We recently suffered a complete server failure (no remote or even console connection). I've found no errors, logs etc that shed light on what/why it happened. The only odd thing about the machine, ...
4
votes
2answers
1k views

Why does chmod(1) on the group affect the ACL mask?

I am trying to understand this Unix behavior (which I happen to be testing on Ubuntu 11.10): $ touch foo $ setfacl -m u:nobody:rwx foo $ getfacl foo # file: foo # owner: michael # group: michael ...
5
votes
3answers
1k views

What equivalent technologies to Microsoft's forthcoming ReFS exist for Linux/Unix?

With the announcement and write-up of ReFS (Resilient File System) on places like arstechnica, I am curious to know what technology, or technology stack, exists for Linux/Unix for a similar outcome. ...
8
votes
6answers
426 views

Track, save and revert file system modifications made by a program under Linux

I'd like to be able to, when a program such as an installer is ran, track the list of the modifications made to my filesystem so that I can revert them afterwards. EDIT: This concerns a non-packaged ...
1
vote
3answers
193 views

Linux Filesystem Organization

As a recovering, long-time Windows user, I've been trying to clarify my understanding of the "proper" place to put things in Linux (or UNIX too I guess but I rarely work in a non-OS X UNIX and Mac OS ...
2
votes
1answer
83 views

Force a process to update cwd after mount?

Redis is dumping snapshots to device that is rapidly running out of space. I've tried mounting a larger device to the snapshot directory, but Redis continues to dump snapshots to the smaller device. ...
8
votes
3answers
12k views

In unix/linux, what is the proc directory for? why does it exists?

In unix/linux, what is the proc directory for? why does it exists? What can I use it for (if not just for the system)?
2
votes
3answers
1k views

Preferred format of file names which include a timestamp

As we all know "unix" can have anything in a file except '/' and '\0', sysadmins however tend to have a much smaller preference, mainly due to nothing liking spaces as input ... and a bunch of things ...
0
votes
3answers
192 views

A process continues writing to renamed file on solaris

There is a java process that makes logging to some file, e.g. err.log. I renamed it (w/o restarting java process), e.g. "mv err.log err.log0" and then see that java process continues logging to ...
1
vote
1answer
490 views

Copy File Contiguously to Disk from OSX/Unix/Linux to FAT32 FS?

So the Sysinternals guys have that cool contig.exe utility that allows me ensure a file is contiguous. I need to copy overs ISO files to a FAT32 USB flash key. Grub4DOS requires the files be ...
8
votes
3answers
11k views

.nfsXXXX files appearing, what are those?

We have an application running (on RHEL5), streaming data onto an NFS share. Recently we saw a lot of .nfsXXXX... (xxx being a hexadecimal number) appearing in its working directory, where the ...
3
votes
2answers
520 views

Unix filesystem hook

I'd like to add a hook to the file system, so I can execute a process whenever a specific file is read from disk. Does *nix provide a way to create such a hook? (I have root access)
20
votes
5answers
2k views

Turning off atime on a filesystem

I am setting up a mongoDB replica set and one of the first things I am suppose to do is turn off atime on the file system. After researching this a bit, I am not opposed to doing this, but I have to ...
0
votes
3answers
326 views

web files permission setup

I could not find out what is the best way to setup your web files under UNIX OS. I have Apache running on Centos OS, I put my root directory under /var/www/html Here is the example: /var/www/html ...
2
votes
4answers
357 views

Does number of hardlinks to a directory correspond to the number of subdirectories in it?

When displaying directories using ls -l, their number of links (the second field in the output) is at least two: one for the dir name and one for . $ mkdir foo $ ls -l total 2 drwxr-xr-x 2 user ...
3
votes
2answers
476 views

What Unix command can I use to enforce a limit of 100 files in a folder?

I would like to delete the oldest files in a directory, after a limit of 100 files. In other words, I want to ensure that no more than 100 files exist in the directory, and if a limit is exceeded, ...
1
vote
1answer
878 views

Best file structure for storing 1000s of photos (in different sizes)

I am developing a site that lets people upload images. We resize each image to 4 sizes. We're expecting lots and lots of images and are considering ways to increase performance with regards to the ...
2
votes
2answers
160 views

HFS theory: What else is there to a system other than a root filesystem?

I'm grokking the HFS linux standard documentation, and I can't move beyond this concept. The concept I don't get can be demonstrated by the following quote: The contents of the root filesystem ...
0
votes
2answers
86 views

Unix / Linux: backing up an app installation

I was having a discussion recently regarding the fact that *nix doesn't use things like a registry (in the Windows sense) and how this means that everything related to an application (or anything for ...
1
vote
2answers
195 views

Selective syncronisation of two directories in UNIX (Solaris)

I'm wondering if anyone knows of a nice way to partially duplicate (hard link) files between two directory structures? My current fall back is a script invoked by cron. As background: I ask since I ...
2
votes
4answers
1k views

Filesystem permissions on Unix

If I have a folder specified as not-readable. Are all folders under it also non-readable? For example, my shared hosting home account directory is not accessible to other accounts, so, are all folders ...
5
votes
6answers
3k views

In *nix, how to determine which filesystem a particular file is on?

In a generic, modern unix environment (say, GNU/Linux, GNU/Solaris, or Mac OS X), is there a good way to determine which mountpoint and filesystem-type a particular absolute file path is on? I ...
6
votes
1answer
7k views

SSL Certificate Location on UNIX/Linux

Is there any standard or convention for where SSL certificates and associated private keys should go on the UNIX/Linux filesystem? Thanks.
2
votes
2answers
236 views

Move oldest file via cron

I've got two directories. /application/inbox /application/unresponsive The application looks for *.txt files in the inbox and works with them. Periodically the application will save entries from ...
34
votes
4answers
17k views

Drawbacks of mounting a filesystem with noatime?

Having every file be updated just when accessing them sounds like a waste. What's the catch with mounting a file system with the noatime option. What kind of applications/servers relies on the access ...
2
votes
2answers
353 views

How to remove someone else's non-empty subdir from own dir in UNIX?

There's a really annoying situation. I own a directory but someone else created a subdirectory in it that I'd like to delete but I cannot because it's not empty. I thought, that owning the directory ...
3
votes
3answers
2k views

block level vs. file level cloning?

I've always been a block level kinda guy but I'm interested in hearing some real world experiences with file level cloning. What are some of the advantages and disadvantages as well as what tools work ...
0
votes
3answers
504 views

Controlling UNIX directory contents user group ownership

I want to create a directory where any user can create a file, but after creating the file the user and group ownership for that file are set to predefined values. I know there is a way to do this ...
17
votes
7answers
18k views

Why can't you fsck a mounted partition?

It's well-known that you should never fsck a mounted partition. I can understand how this could easily lead to corruption if the filesystem is written to by fsck (e.g., the -a option is used), but why ...
16
votes
6answers
32k views

How do I determine the block size of an ext3 partition on Linux?

How do I determine the block size of an ext3 partition on Linux?
7
votes
5answers
7k views

How do I list a file's data blocks on Linux?

As I understand it, each file on a Unix-like operating system has an inode number (which can be viewed with "ls -i"), and each inode is a list of disk blocks that contain the actual data of a file. ...
5
votes
3answers
3k views

Directory that a user can read, but root can't?

There's a directory underneath my homedir called ".gvfs". As my regular user account, I can read it just fine: ~ $ ls -lart ~raldi/.gvfs total 4 dr-x------ 2 raldi raldi 0 2009-05-25 22:17 . ...
14
votes
3answers
5k views

To fsck or not fsck after 180 days

By default after 180 days or some number of mounts, most Linux filesystems force a file system check (fsck). Of course this can be turned off using, for example, tune2fs -c 0 -i 0 on ext2 or ext3. On ...
44
votes
3answers
5k views

What is the difference between a soft (symbolic) link and a hard link?

I hear that you can now create soft links in Vista too. So, what is the difference between a soft (symbolic) link and a hard link on UNIX/Linux/Vista? Are there advantages of using one over the ...
17
votes
2answers
12k views

What is the sticky bit in UNIX file systems? When is it used?

What is the sticky bit in a UNIX file system? As an admin when and how would you use it?
10
votes
8answers
10k views

Is it possible to hide lost+found?

Given a partition intended solely for storing music, video and so-on, is it possible to hide the lost+found directory?
7
votes
6answers
2k views

Linux/UNIX Server Setup Practices for /tmp

Based on what you all see out there what is a recommended configuration of /tmp on a server system and why. I've had discussions on these points over the years sometimes with basic disagreements. ...