![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Type I and Type II Errors - The Heart of Event Processing | iBot | Complex Event Processing RSS News | 0 | 12-05-2007 02:50 PM |
| Human readable type vs MIME type detection using file | spauldingsmails | Shell Programming and Scripting | 0 | 03-21-2007 08:43 PM |
| backing up file everytime script run and saving other backups | knc9233 | UNIX for Dummies Questions & Answers | 4 | 01-29-2007 05:21 AM |
| Saving a vector to a file | J.P | High Level Programming | 1 | 04-27-2002 11:28 PM |
| Saving a redirected file | JSP | UNIX for Dummies Questions & Answers | 1 | 09-27-2001 03:52 PM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Control saving file by type
Is there a way to control that under a specific directory only a file with certain extension is allowed to be saved, others are denied.
For example, only *.txt extension is allowed to be saved in directory /abc, and files with extension .rtf is allowed in /xyz (I know that UX does not care about file type, but i am hoping somone has come up with something...) TIA |
| Forum Sponsor | ||
|
|
|
|||
|
.enter.sh
You might be able to do some scripting in a .enter.sh (.enter.csh is the C shell)
This is the standard name to use for something meant to execute, going into a directory. I haven't really monkeyed around with that myself. I just ran across it while casually flipping through Unix Power Tools. Here's abit of info on that: http://examples.oreilly.com/upt3/ As to *what* you'd put in the script to do that, I'm not sure! Why are you wanting to accomplish this? I'm just curious, and letting us know might help in someone coming up with a solution. |
|
|||
|
control file saving by type
Thank you gjduff! I have bunch of users who consistently save their outputs in their code library and code in output library, we have tried every thing short of clobbering 'em over the head...hence the idea that maybe we could systematically enforce the rules.
Thank you again. |
|
|||
|
ok
Another idea might be possibly to run a cron job
that checks that directory and appends "the extention" to any file that doesn't have it. ( Or any file that has a different one, though that would be somewhat more work. Eww! Work! Depends if you care about extensions on top of extensions ) Also, even though so called "cross posting" is discouraged, you might want to also ask at www.justlinux.com I've probably had more luck in finding solutions to "weird, fringe problems" there than anywhere else, so far. |