5
votes
4answers
283 views

Why does the root directory '/' have a reference to its “parent”?

I'm currently developing a fake filesystem for a browsergame. I recently implemented ".." and "." folders so every folder has a reference to its parent. Then I checked in my terminal if "/" also has ...
2
votes
1answer
31 views

Can I create a “symlink-esque” file to “merge” two files together?

I'm dealing with an application that reads a config file, config.yml, from the current directory. This config file contains both secret information (API keys) that shouldn't be checked in to source ...
0
votes
1answer
41 views

Unix : Avail Space of File mounts

Problem Statement This is regarding the space usage of file system mounted in Unix box df -h -> Gives the total usage/avail/used/used% of all mounts in unix server Is there any other way to ...
0
votes
1answer
21 views

what is the difference between /var/lib and /var/run

I am studying unix-like filesystem structure especially FHS. Anyways i know in the recent FHS /var/run is moved to /run I can't understand the difference between lib and run. Can someone elaborate ...
1
vote
1answer
105 views

From where comes the inode number of a file mounted through NFS?

I asked a question on codereview to know if I could safely replace the following code: :inode => [stat.ino, stat.dev_major, stat.dev_minor], which threw NotImplementedError because of jruby not ...
2
votes
1answer
2k views

How to get actual creation time of a file on Unix?

I'm inspecting some files in my dedicated web server via linux cli after a hack attack and found some files have been modified with the 'touch' command to change the dates. I'm willing to get the ...
0
votes
3answers
85 views

UNIX vs Windows Filesystem; why does UNIX assign a finite space for each directory?

All, I am finally getting settled into the intricacies of NIX however one thing I am still trying to figure out is why UNIX assigns hard disk space to each directory in its filesystem. I discovered ...
0
votes
1answer
2k views

Canot format MicroSD. File system is read-only

I formatted it for my special needs some time ago using fdisk. Don't remember the partition table, but there was 1 fat32 and 1 ext4 partition. Now I want to format it fat32 clean, but I get the ...
5
votes
1answer
59 views

How many ways does Unix feign files?

I know Unix filesystem sometimes has things that appear to be files but are not actually files. The files in dev actually point to devices. Its also possible to created named pipes which also appear ...
3
votes
2answers
523 views

Resolving unix server disk space not adding up

I'm trying to evaluate where my disk space on my unix server is distributed. In order to see disk space current status I'm running: df -h But when trying to evaluate what is taking the disk space ...
1
vote
1answer
83 views

Why the link between .. and the parent dir is hardlink?

I just noticed that the link between .. and the parent dir is hardlink, they have the same inode number: starpinker@host /home/starpinker/unix $ ls -ail 8200794 drwxrwxr-x 2 starpinker starpinker ...
1
vote
1answer
601 views

What is the recommended directory to store website content?

When I first started programming for the web and I wanted to create a new project I was always taught to create a directory in /var/www/. However in a lot of tutorials I read people tend to create a ...
2
votes
2answers
132 views

Accessing an “unnamed” file

I have this situation in a certain directory: $ ls -al ... drwxr-xr-x 2 me users 8192 Juni 28 15:27 tmp -rw-r--r-- 1 me users 439 Jan. 3 2013 ... How can I access the second ...
16
votes
2answers
1k views

Is there a git-like file system?

Git stores content uniquely in its repo based on the calculated hash of any file. Thus, if my directory has two copies of the same file somewhere inside it, git will only actually store it once. I ...
1
vote
1answer
87 views

How much additional disk space does tar require

I am moving a tar.gz archive between servers and had to note that when extracting the archive a large amount of additional disk space is used. My original data size is 12G, 7.8G compressed and ...
2
votes
1answer
57 views

Can I create a symlink or similar that returns a random file from a set every time?

Say I have files foo-a.wav, foo-b.wav and foo-c.wav on disk. I have a piece of software whose interface allows me to enter the name of a single sound file; every time a certain feature of that ...
1
vote
1answer
35 views

Linux: Contents of “global” folder synced to other folders automatically

I have a directory that has 3 sub directories. "global_plugins", "foo", and "bar" foo and bar both have a subfolder called "plugins". I want the content of "global_plugins" to appear in plugins, on ...
1
vote
0answers
190 views

Retaining usable permissions and ownership copying unix files to NTFS

I have an old solaris system with terabytes of data on it. Recently we got a new server and I went along with the recommendation of a windows server "because it was easy to manage". Someone copied ...
0
votes
1answer
43 views

Concurrent request to create directories

What happens if there are 2 concurrent requests to create a directory in file system (what are the differences concerning this problem between knonw FSs?)? Will one request success and another fail ...
3
votes
3answers
177 views

What unix command would I be able to write a Bash Shell script that would create files in a series of directories?

I need to write to a shell script that takes a list of directories from file (the directories would be on different lines) and then for each of those filepaths it would create a hidden dummy file ( ...
5
votes
7answers
2k views

“chown -R root /” how screwed am I?

I accidentally performed the command chown -R root / while trying to change the permissions to the public folder of my rails app. I believed this changed the permissions to all my folders on the / ...
3
votes
1answer
211 views

How to make a filesystem readonly by default?

I am not talking about tweaking fstab or about the use of the "mount" program... I was thinking of tune4fs, btrfstune and the like : I'd like to know if you've heard of any filesystem being able to ...
4
votes
1answer
2k views

How are directory structures stored in UNIX filesystem?

I have read that each directories store their content (files and subdirectories) by using a list of filename and inode pairs. But none of the reference I got said something about how they are stored. ...
0
votes
1answer
207 views

the effect of large number of files on disk space in unix filesystems

If I have a text file in Unix that contains N-many independent entries (e.g. records about employees, where each employee has a separate record), is it expected that this file will take up less space ...
0
votes
1answer
96 views

differnce between blocksize and bytesize in linux/unix filesystems

Can anyone discuss the exact difference between block size and byte size, when it comes to disk sizes for Linux/Unix filesystems.
0
votes
1answer
291 views

Can't create a file even if rights allow and I've relogged in

I try to create file in folder with group write access, user tomcat7 is in group. Why isn't it workin? skr@konrad~/data/asu$ sudo -u tomcat7 sh $ whoami tomcat7 $ echo > ...
1
vote
0answers
159 views

How do I search/replace symbolic links?

I've been having this issue for a long time, and I don't want to reinstall the whole system, yet. Now there's an app that runs on Java, and it doesn't even open. The logs says some cocoa files were ...
0
votes
1answer
93 views

Quick way to empty a partition

I have a partition, formatted ext4, that I want to empty completely. I will be repeating this write-then-empty process repeatedly, so I want the emptying step to be as quick as possible. One option ...
7
votes
2answers
2k views

What exactly does the dd command do?

A few days ago I was delighted to find out that it's not all that difficult to write an iso image to a USB without the help of a third-party program explicitly designed to do so. But the command (or ...
0
votes
1answer
1k views

Mount -a on reboot after modifying /etc/fstab

I added the third line to /etc/fstab. proc /proc proc defaults 0 0 none /dev/pts devpts rw 0 0 tmpfs /dev/shm tmpfs ...
1
vote
5answers
851 views

Why do I need an 'execute' bit in file mode on Unix file systems?

When I got an executable file with read-only permission (read and execute to root), I can always copy it to my home directory where I have full-control permission. Then I set the new file to read and ...
1
vote
3answers
441 views

Why is there a // directory?

I just found a very weird feature (bug?) with my computer's file system. I can do cd // and it will go to the // directory, but display all the same files as the / directory. Why is this? If I cd .. ...
2
votes
1answer
309 views

What is a socket link?

After noticing an interesting environment variable Apple_PubSub_Socket_Render. I notice that it was referring directly to this "Render" file. After doing a listing of "Render": ls -lh Render I ...
0
votes
1answer
118 views

Unix: how does cp work for files larger than available RAM?

Does it copy the file in batches, or does it stream the file through memory, reading and writing simultaneously?
2
votes
1answer
567 views

Any file system debugger similar to `fsdb` in Linux?

I'm now studying Linux file system and curious about how to read an i-node with a i-node # get from ls -i? Seems fsdb in Unix is such a tool but didn't find its correspondent in Linux. Thanks and ...
2
votes
3answers
3k views

Editing files in /var/www

I know that the owner of the files in /var/www must be www-data to properly run by apache. But when i run the chown -R www-data:www-data /var/www command i can't the php files in my editor. How can i ...
2
votes
4answers
2k views

Get the newest file from non-current directory

I am having trouble executing a command which will give me the latest file from another directory. Example: ls -tr | tail -n 1 /prj/somedir/anotherdir/closerdir/targetdir there is a list of ...
0
votes
2answers
3k views

Making a directory on unix readable,writeable,executable by me and no one else?

What is the proper way to make a directory that I created and all of its contents readable/writeable/executable only by me, and no one else? Is this sufficient: chmod g-rx mydir/ this should make ...
6
votes
3answers
6k views

How to split big files on MAC?

I have a 5 GB file on my MAC and can not copy it on flash memory or external hard formatted with FAT. How I can split it to some smaller files
0
votes
1answer
61 views

Where should I download new install files to in a Linux system?

Say I'm installing Redis. Where should I download the Redis files to? I'm guessing that doing it in my home directory isn't a good idea, just because it'll get messy with downloaded files over ...
1
vote
1answer
184 views

hard drive Noises from different file systems (NTFS, EXT3, etc)

I've been using many operating systems since many years ago, and I've noticed something curious that I cannot find answers in any place on the internet. It's the different noises produced by NTFS/FAT ...
1
vote
4answers
1k views

Read a file that's actively being written

I am downloading a large file via FTP so that I can process the file on my local system. The program that processes the file reads the file line by line in a single pass, creating two new files from ...
1
vote
2answers
63 views

Is there a savepoint like feature in Unix based Operating System?

I'm interested in knowing if things like File system structure creation/modification Execution of commands like adduser Changes made between specific duration start/end datetime can be reversed, ...
1
vote
1answer
152 views

How to delete files in a directory, that exist in another directory?

What I need is a 'subtract' operation on sets of files in different directories. Assuming this file system hierarchy: A\1.txt A\2.txt A\3.txt B\2.txt B\4.txt ... I'd like to remove all files under ...
1
vote
1answer
135 views

Setting the last file status change time

stat will report the last access time, last data modification time, and last file status change time. utimes will allow one to set the last access time and last data modification time. Is there a ...
3
votes
1answer
332 views

Attributes of a file

I am trying to determine what all of the attributes are of a regular file (as opposed to a symbolic link, etc.) on Mac OS X with Mac OS Extended (Journaled) (HFS+). Here is my current list: ...
171
votes
8answers
8k views

How far will you get with an 'rm -rf /' command?

I've often wondered how far the system will actually get if you run rm -rf /. I doubt the OS would be able to erase itself (?) Bonus Question: After the command has been executed, will rm have ...
7
votes
5answers
9k views

Stuck choosing between ext4 and ext3 for the file system

I was in the process of installing Ubuntu 11.10, but got stuck choosing which file system to use. ext3 and ext4; which is better for a personal desktop? If ext4 is better, will it work well on my ...
1
vote
2answers
1k views

What is rwfs filesystem?

I did a df on my embedded device and saw that the one of the filesystems mentioned was rwfs. What is rwfs ? df Filesystem 1k-blocks Used Available Use% Mounted on rwfs ...
0
votes
3answers
176 views

Unix/Mac [bash/c api]: detect if a given path points to a file on a removable device

Is there a *nix command or C api that will tell the type of the storage device given the path to the file (resolving the mounts, symlinks, etc)? I need to find out whether the file lives on a ...