[Samba] Re: PDC Administrative scripting

Jim C. jcllings at javahop.com
Thu Jul 8 23:04:24 GMT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

OOooOOOOOooOO Fancy, shmancy. ;-)

I'm thinking of useing a bash script wrapper around another called
rmtotrash (renamed to dl for delete) by Philip Clarke to remove files to
the users trash in his or her home directory. This way if one of your
users comes whining (in a stylized nasal voice): "My important files got
deleted!" you can say "Really, you don't say?  How important were they?"
and make a decision on weather or not to tell them that they are still
available through the trash directory on the homes share. ;-)


Jim C.

BTW, some of the code is missing from below.
|> I am more interested in preventing files over a certain size.
|
|
| Excelent idea! Barrowing from the piece of code I wrote to answer the
| first question, here is a custom script for you...
|
| /* Sample code to search and destory! */
| searchlist='.mp3 .wav .avi'
| maxokfilesize=10000
| do s=1 to searchlist~words()
|    rc=SysFileTree('/homes/*'searchlist~word(s), filelist., 'FS')
|    if filelist.0>0 then do f=1 to filelist.0
|       parse value filelist.f with . . THISsize . THISfilename
|       if THISsize>maxokfilesize then do
|          rc=SysFileDelete(THISfilename)
|       end
|    end
| end
|


- --

- -----------------------------------------------------------------
| I can be reached on the following Instant Messenger services: |
|---------------------------------------------------------------|
| MSN: j_c_llings at hotmail.com  AIM: WyteLi0n  ICQ: 123291844 	|
|---------------------------------------------------------------|
| Y!: j_c_llings               Jabber: jcllings at njs.netlab.cz	|
- -----------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3-nr1 (Windows XP)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFA7dL457L0B7uXm9oRAs5wAJ4uXzQ6baxOgae8Ycg9YjBtlmgXOQCfWJ2G
mX5IyP36Ky3gJ5KXqyt1Qqo=
=W801
-----END PGP SIGNATURE-----



More information about the samba mailing list