Commit d8ef2c27 authored by kpetersn's avatar kpetersn
Browse files

Minor changes to the README

parent 0d18cb78
......@@ -8,8 +8,8 @@ Why is this script needed?
There are a number of compounding factors:
* Only root can change the user ownership of a file with the ```chown``` command
* The default ```umask``` of ```22``` encourages creating files that are not writable by group members
* Only ```root``` can change the user ownership of a file with the ```chown``` command
* The default ```umask``` of ```22``` encourages creating files that are **not writable by group members**
* Files frequently need to be modified by group members.
Usage
......@@ -19,18 +19,18 @@ $ ./takeOwnership.sh
Usage: takeOwnership.sh <username> <directory> <file_pattern>
```
* *username* the username of the files from which ownership will be taken
* *directory* the directory containing the files from which ownership will be taken
* *file_pattern* the glob pattern matching filenames from which ownership will be taken
* **username** - the username of the files from which ownership will be taken
* **directory** - the directory containing the files from which ownership will be taken
* **file_pattern** - the glob pattern matching filenames from which ownership will be taken
Example
-------
This will change the ownership of all adl files in the 32idsectorApp/op/adl dir (and subdirectories) from bcda to the user running the takeOwnership script.
```
$ ./takeOwnership.sh bcda /net/s32dserv/xorApps/epics/synApps_5_6/ioc/32idsectorApp/op/adl "*.adl"
```
This will change the ownership of all adl files in the 32idsectorApp/op/adl dir (and subdirectories) from bcda to the user running the takeOwnership script.
Theory of Operation
-------------------
......@@ -39,9 +39,9 @@ The user running takeOwnership.sh must have write access to the directory specif
takeOwnership.sh does the following:
1. Runs ```find``` with ```-user=<username>``` and ```-name="<file_pattern>"``` to get a list of the relevant files
1. Iterates over the list of files
1. Moves each file to file-DELETE-ME-SOON
1. Copies file-DELETE-ME-SOON to file, preserving timestamps
1. Deletes file-DELETE-ME-SOON
2. Iterates over the list of files
2a. Moves each file to file-DELETE-ME-SOON
2b. Copies file-DELETE-ME-SOON to file, preserving timestamps
2c. Deletes file-DELETE-ME-SOON
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment