Skip to content

maggiemcfee/make_default_dirs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

This is a script created for a very specific cleanup project. It does the following:

  • Take two inputs: share path and log file path (else it will spit out instructions)
  • It will check to make sure the log file, if it exists already, is writeable (because I ran into this specific problem myself)
  • It will then check the path and get the owner and group for the path
  • It will then write to the log file the file path and also the current POSIX permissions for that path. -- Like: File path: /tmp/root_lab - Owner: root - Group: root - Permissions: 755 -- dashes separate entities, colons separate values. This makes this output very awk'able
  • It will then check the path for a sub-directory called Lab. If the sub-directory Lab exists it will write to the log ‘Lab exists’. If the Lab sub-directory does not exists it will create it -m 2770 and -g groupname and write to the log ‘Lab created’
  • It will then check the path for a sub-directory called Everyone. If the sub-directory Everyone exists it will write to the log ‘Everyone exists’. If the Everyone sub-directory does not exists it will create it -m 0775 -g groupname and write to the log ‘Everyone created’

About

bash script for a storage cleanup project - checks Lab and Everyone dirs and creates if missing

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages