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.
Related
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.
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 am trying to copy files from one hard drive to another in my home server using the cp command. I am copying from an NTFS-formatted partition to an ext4 partition on a new hard drive I have installed.
Is it possible for the cp command to corrupt the transferred files?
Should I be using something like rsycn to verify file integrity is checked upon completion instead?
I would use rsync.
rsync can give you additional checksums, but the real power is the ability to resume after interruptions. This really helps for large files like VMs.
This really is more a serverfault question - See copying-a-large-directory-tree-locally-cp-or-rsync.
rsync should be better than cp when copying files.
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
Is there any difference at all in server load when adding new lines to a big vs. small access.log file?
What I mean is, should I delete my access.log files if they become too big or leave it. It is 6GB right now. I do not rotate.
I'm not sure about the performance difference of big or small files, but maybe you want to split them every month and compress old access-log files. For that you can use logrotate. More information in the man page
Log rotation is an important part of maintaining a server. Without it, you'r likely to fill up your disk, and then your server will behave extremely strangely, depending on the app.
Regardless of performance, you should be using logrotate or something similar.
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 have a file from TREC(Text REtrieval Conference) whose extension is .0z .1z etc etc. I tried every method I can do, but still failed. Could someone do me a favour please?
There are some evidence that might helpful.
In terminal, I used "file" command then it shows "fr940104.1z: compress'd data 16 bits".
I also check the properties of the file under GUI, which shows UNIX-compressed file(application/x-compress).
and are stored in chunks of about 1 megabyte each
indicates that you need to recombine the chunks before decompressing. Hopefully the filenames can help you with that ("chunk001.z", "chunk002.z", ?). Assuming that you can figure out the order, use cat to combine them into one file. Then use Unix uncompress. Or pipe directly from cat to uncompress.
.z normally means simple Unix compression. Does
uncompress filename.z
not work?
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.