What is up with Linux and Apache's ".d"? [closed] - linux

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Linux and Apache suffix a bunch of files and folders with d or .d.
init.d
rc.d
/etc/httpd/conf.d
/etc/httpd/vhost.d
What is the meaning of this convention?

It means simply "directory" and commonly indicates that either a single file, or a directory full of them is acceptable for configuration.
(In the case of rc.d, that replaces the old-style Unix /etc/rc script which is no longer used on Linux.)

Means "a directory", containing a bunch of files intended for the same goal (init scripts in init.d, configuration files in conf.d, etc.) - this tendency seems to have expanded onto separate files, too.

Related

How can I get the source code for file utility in linux? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I need do find the timezone data file format. So i need file utility source code to port the executable file to our board.
No, you don't. The file utility only knows about how to quickly identify a file -- that is, the minimum information needed to determine that this is a image, that is a text file, this is an ODT file etc (the 'magic' as it is called). It's a mistake to think it knows anything more than that.
Instead, you should look at the 'tzfile' man page, as it is all about the timezone file format. It describes it quite precisely.

Why can one remove/rename open files in Linux? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I learned that open files can not be removed/renamed in Windows but can be removed/renamed in Linux (by default). I think I understand the reasons of the Windows behaviour.
Now I wonder why Linux allows remame/remove of open files ? What was the design rationale behind this decision ? What are the use cases when one need it ?
the difference is that linux works on file handles rather than file names. as long as the file handle is valid you can read and write to it.
renaming a file in linux does not alter the file handle.
one very interesting use case is to delete temp files after opening them.
this makes it impossible for every other process to access this file, while the process that owns the file handle can still read and write.

Where should an `.htaccess` file be located? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I noticed that I had two .htaccess file on my website's server, one in the root folder, one in the www folder. Which one is active and which one should I delete?
You put the .htaccess in the folder whose behavior you want to alter. This also affects the behavior of all the sub-folders. It can happen that you want different behavior for one or more of the sub-folders in which case you give them their own .htaccess file and override the settings that are not to be inherited from the parent.

What are circular symlinks in Unix-like systems used for? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I was browsing a directory on a Linux machine, and when doing a detailed listing I noticed that a link is pointing to itself, for example:
somelink -> /path/to/directory/somelink
I am wondering what is the reason for doing such a thing?
If the somelink is in /path/to/directory then this is an invalid symlink. If you try to access it, the filesystem will give you an error (probably something like too many levels of symbolic links*). It could have been a typo (or some other mistake) when it was created, or the symlink got moved somehow and ended up linking to itself.
There's no good reason for a circular symlink. Most probably, it was created by accident.

Use of /etc/passwd-, /etc/shadow-, /etc/group- [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
In addition to the files : /etc/group, /etc/passwd and /etc/shadow, I could see three files in my linux machine.
/etc/group-
/etc/passwd-
/etc/shadow-
I cannot see these files in my root filesystem. But when I try to add one user using useradd command, these files seem to get generated.
So i would like to know when exactly is these files created and what is the use of these files?
These are backups of previous versions.
Manual pages show these files and states:
/etc/passwd-
Backup file for /etc/passwd.
/etc/shadow-
Backup file for /etc/shadow.
Note that this file is used by the tools of the shadow toolsuite, but not by all user and password management tools.
See http://manpages.ubuntu.com/manpages/oneiric/man5/shadow.5.html and http://manpages.ubuntu.com/manpages/oneiric/man5/passwd.5.html

Resources