Tagged Questions
3
votes
1answer
60 views
How can I delete a hardlink to a directory?
Before I get 100s of answers that tell me it is impossible to hardlink directories in linux: yes, I know that.
The file in question appeared in lost+fount after I checked the filesystem with e2fsck ...
1
vote
1answer
83 views
How do I manually modify an inode?
I am using Ubuntu Linux and, just for fun, I want to create a hardlink to a directory (as seen here). Because I'm just doing this for fun, I'm not looking for any sort of pre-developed ...
1
vote
2answers
138 views
Why can I only run a .sh file from the parent directory, not the child directory
I am a Linux noob. I noticed that this does not work:
/tomcatDirectory/bin $ startup.sh //command not found
but this does work
/tomcatDirectory $ bin/startup.sh
I am used to Windows. It seems ...
1
vote
2answers
149 views
How can be monitored I/O stream in a particular Linux directory or file?
I have a problem with monitoring of i/o stream in the particular directory(amount of read and written bytes during specified period). I have been trying to use iostat, inotifywait and inotifywatch, ...
4
votes
2answers
230 views
What are the advantages of the Unix file system structure
If I install an application in Linux for example Debian/Gnu Linux, the files of the applications are copied to many different directories in the file system.
Some scripts goes into /usr/share .. ...
1
vote
1answer
101 views
How to change the current directory graphically using the keyboard only?
There was a program named NCD (Norton Change Directory) a few years ago that did a good job at helping me change directory back in the DOS days.
This programs displayed a tree, and you could navigate ...
1
vote
1answer
102 views
What does - mean with association to Linux files and directories [duplicate]
Possible Duplicate:
What does “--” (double-dash) mean?
What does '--' (two dashes) mean with association to Linux files and directories.
I've found something else but not too sure if it is ...
9
votes
3answers
843 views
When should I use a trailing slash on a directory? [duplicate]
Possible Duplicate:
How linux handles multiple path separators (/home////username///file)
Most commands I use in linux behave exactly the same whether I include the trailing slash / ...
10
votes
1answer
192 views
How to log all the events performed on directory?
How can I log all the events performed on a particular directory?
I want to log the entry of each directory modified within some time duration. I am using find . -type d -mmin -5 command.
In ...
3
votes
1answer
195 views
How does the Linux file structure work?
I see the different folders bin, dev, mnt, proc, srv, sys, etc.
What are the properties of all these different folders? What are there purposes? Are there files in some of them that I should not ...
1
vote
1answer
87 views
Linking “..” do somewhere other than parent directory and other strange fs beharviors
Can the entry ".." become linked to someplace other than the parent directory? Is it possible to cause "tar" to create this weird behavior?
Scenario: I have a pre-built compiler to a embeded system, ...
9
votes
4answers
620 views
Best method to collect a random sample from a collection of files
Suppose there is a directory holding 300 data files. I want to randomly select 200 of those files and move them into another directory. Is there a way to do that under Unix/Linux?
2
votes
1answer
916 views
How to remove an empty directory (btrfs filesystem)?
I'm using the experimental btrfs filesystem.
My directory looks like this:
ls -la empytfolder
total 4
drwxr-xr-x 1 root root 0 19. Mär 14:00 .
drwxr-xr-x 1 root root 298 19. Mär 13:59 ..
I ...
0
votes
2answers
1k views
How to calculate in linux number of file inside nested directories?
I need to extract information how much files are in some directory tree:
/.../testRoot/test1/test11/..../file1
/.../testRoot/test1/test11/file2
/.../testRoot/test1/test11/..../file3
...
1
vote
3answers
283 views
What is an appropriate naming structure for storing application packages?
I need to determine an appropriate directory naming structure for a package management system. The original directory structure was not POSIX-compliant in any way and certainly not UNIX-style (you'll ...
0
votes
3answers
1k views
Options for .hidden files?
What options exist for the .hidden file? I wanted to hide certain filetypes in a folder, but simply putting *.out, which I assumed would hide all files ending in .out, didn't work. :(
I'm using ...
2
votes
2answers
2k views
How can I selectively copy files from one directory to another directory?
On Linux, how do I selectively copy most – but not all – files from a directory (dir1) to another directory (dir2)?
I do not want to copy *.c and *.txt files to dir2.
The cp man page ...
3
votes
4answers
840 views
Accidental deletion of /lib directory in Fedora 15
I accidentally deleted the /lib directory on my Fedora 15 machine and I'm not sure how to go about fixing this. Any help in figuring out how to restore the directory along with symbolic links would be ...
0
votes
0answers
56 views
How can I log who creates a directory? [duplicate]
Possible Duplicate:
Is it possible to find out what program or script created a given file?
Is it possible to log which process/user/IP created a directory? I only found out that the ...
2
votes
2answers
487 views
Directory/files owned by a non-existent user
A user has created a directory with files, but the user does not exist in /etc/passwd or /etc/group. The system is a Fedora server with an FTP server and proxy which redirects to a CentOS server with ...
45
votes
3answers
10k views
Why do directories need the executable (X) permission to be opened?
In my CMS, I noticed that directories need the executable bit (+x) set for the user to open them. Why is the execute permission required to read a directory?
3
votes
1answer
457 views
Prevent a subdirectory from getting deleted / enforce a directory structure
imagine the following folder structure
../documents
../documents/templates
I have two user groups:
editors
managers
Users of both groups should be able to
create new files
modify any ...
4
votes
2answers
976 views
Using vim to view the contents of a directory file
As I understand, in Linux directories are mostly normal files w/ some special handling (e.g. 'rm' a file is ok; 'rm' a dir will complain w/o -r).
When I execute the following bash commands:
mkdir ...
4
votes
2answers
65 views
Making a duplicate of a path in Unix
My Unix vocabulary is failing me. I have 5 billion images in /foo/live/images.
For the purposes of developing a new version of the app I'd like to make /foo/dev/images into a working path without ...
3
votes
2answers
752 views
How many files can be saved in one directory on Linux? [duplicate]
Possible Duplicate:
Number of files per directory
I need to save 1 milion static html files in one directory as there is not possible to group the files into the directories (all files must ...
2
votes
4answers
10k views
How to remove all the files in a directory?
I am trying to remove all files and subdirectories in a directory. I used rm -r to remove all files, but I want to remove all files and subdirectories, excluding the top directory itself.
For ...
13
votes
5answers
2k views
What's the most “correct” mount point for a permanent NTFS partition?
I have an NTFS partition (containing a Windows installation from which I dual boot) that I would like to permanently mount from my Linux installation. Problem is, I can't figure out what the ...
20
votes
5answers
9k views
Difference between /bin and /usr/bin
I read this up on this website and it doesn't make sense.
http://rcsg-gsir.imsb-dsgi.nrc-cnrc.gc.ca/documents/basic/node32.html
When UNIX was first written, /bin and
/usr/bin physically resided ...
7
votes
3answers
1k views
How does one atomically change a symlink to a directory in busybox?
I am trying to (as close as possibly) atomically change a symlink. I've tried:
ln -sf other_dir existing_symlink
That just put the new symlink in the directory that existing_symlink pointed to.
ln ...
4
votes
1answer
373 views
How to use diff tool to take a diff between directories with libraries and source?
I would like to know if i can use the diff tool to take the difference between two folders which contain sources as well as libraries and executable.
Right now i gave
diff -Naur dir1/ dir2/
...
1
vote
0answers
134 views
How can I list only the directories present in a directory using ls? [duplicate]
Possible Duplicate:
Is there any option with 'ls' command that I see only the directories?
I have a directory with a lot of files but only a few directories.
To get a list of only ...
6
votes
2answers
954 views
games directory?
On a standard filesystem, we have:
/usr/games
/usr/lib/games
/usr/local/games
/usr/share/games
/var/games
/var/lib/games
Is this a joke, or is there some history behind this? What is it for? Why do ...
