Clone ownership and permissions from another file?
Is there a command or flag to clone the user/group ownership and permissions on a file from another file? To make the perms and ownership exactly those of another file?
Is there a command or flag to clone the user/group ownership and permissions on a file from another file? To make the perms and ownership exactly those of another file?
If you do rm myFile where myFile is a hard link, what happens?
How to move directories that have files in common from one to another partition ?
How can I Get a list of all files modified , say 3 months ago.
I checked this question but I was not able to apply it to my scenario.
I am trying this now , it seems to be working , but I know there should be a better way using find.
I was reading up on chmod and its octal modes. I saw that 1 is execute only. What is a valid use case for an execute only permission? To execute a file, one typically would want read and execute permission.
I have a ton of files and dirs in a subdirectory I want to move to the parent directory. There are already some files and dirs in the target directory which need to be overwritten. Files that are only present in the target should be left untouched. Can I force mvto do that? It (mv * ..) complains
I have a folder with some directories and some files (some are hidden, beginning with dot).
If a file tells the OS its file format, how does the OS choose which application to open it by default?
Well, to be specific, it was chmod -R 755. Now every file is executable, which I don’t want.
I am thinking that I should look at the first two bytes of each file for the #!, but will this cover everything? Should I instead use file to look at everything and base my decision on that? Or, more likely, is there an even better way to do this?
How can I get the age of a given file in, at least, days?