Tagged Questions
2
votes
1answer
18 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
18 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
61 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
19 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
77 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
557 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
98 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 ...
2
votes
1answer
328 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
63 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
62 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
75 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
107 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
45 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 ...
6
votes
2answers
620 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
658 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
407 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 ...
0
votes
3answers
229 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
122 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
79 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
227 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 ...
1
vote
3answers
1k 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
729 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
1k 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 ...
2
votes
3answers
866 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
51 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
4answers
416 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
55 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
103 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
114 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 ...
2
votes
1answer
202 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:
...
152
votes
8answers
6k 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 ...
5
votes
4answers
5k 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
750 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
158 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 ...
1
vote
2answers
74 views
Unix Display Which Filesystem
How do I display which type of filesystem I am currently browsing (i.e. ext3, ext4, or xfs)?
2
votes
3answers
2k views
Is there a limit on the number of files in UNIX?
Is there a limit on the number of files in UNIX in the filesystem?
2
votes
1answer
223 views
How do you create virtual folders from saved search
I would like to have on unix-like platforms, the same functionality as to Windows 7 Library folders (aka virtual folders) you see in Windows Explorer.
Gnome Nautilus do that kind of virtual folders ...
1
vote
1answer
227 views
Tail the filename, not the file
In UNIX (OS X BSD to be precise), I have a "tail -f" command on a log file. From time to time I want to delete this log file so I can more easily review it in my text editor.
I delete the file, and ...
2
votes
3answers
641 views
How can I allow normal users to mount tmpfs under subdirectories of their home directory?
How can I allow normal users to mount a tmpfs under any subdirectory owned by them?
3
votes
2answers
1k views
Why can't I mount the same filesystem at multiple points, and why can't a mount-point inode reference count be > 1?
I'm reading The Design of the Unix Operating System by Maurice J Bach, and have two questions regarding file system mounting:
Why does the file system mount fail when the reference count of the ...
2
votes
3answers
127 views
Open file without specifying exact location
Say I have a file in some obscure directory that I want to open and edit. I don't want to do something like this...
vim ~/foo/bar/blah/doh/ugh.txt
I'd rather be able to say find this file and open ...
2
votes
4answers
560 views
Only show hidden files in certain directories
On a Unix system (or more specifically on Mac OS X) is it possible to show hidden files in only some directories? For example as a developer I want to see the hidden files
in my Ruby on Rails ...
4
votes
1answer
301 views
Unix: softlinks, hardlinks
I am somewhat confused what the differences between a softlink, and a hardlink are (on unix).
It seems like a softlink is the same as a shortcut in windows or an alias on Mac OS X. (Can someone ...
3
votes
2answers
394 views
unix file permissions
File permissions in UNIX are frequently specified as an octal
number. Why is octal the preferred base for this purpose?
3
votes
1answer
67 views
How do I retrieve basic information about an afs mounted filesystem
Given an afs mouted filesystem, can I discover what IP address or DNS name it is served from? Can I learn anything about the drive/partition it occupies on the serving machine?
Background: I am user ...
1
vote
2answers
888 views
In unices, do new folders/files inherit parent permissions?
In unices, do new folders/files inherit parent permissions?
What about groups and owners? (maybe those don't qualify as permissions...?)
1
vote
2answers
945 views
monitor all changes to files on UNIX system
I'm trying to figure out what changes to disk an app does.. and it's very messy.
I'd like a way to monitor my entire file system for a few seconds to know which files have been accessed and written ...
2
votes
1answer
84 views
Local links ( in browsers ) on *nix systems
On Windows I can access files directly from the browser ( or at least I have it configured currently, forget if it was native like this ) with the file:// protocol, so I can access files from say the ...
