The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


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 !!

More UNIX and Linux Forum Topics You Might Find Helpful
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 03:50 PM
Human readable type vs MIME type detection using file spauldingsmails Shell Programming and Scripting 0 03-21-2007 09:43 PM
backing up file everytime script run and saving other backups knc9233 UNIX for Dummies Questions & Answers 4 01-29-2007 06: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

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 02-14-2005
Registered User
 

Join Date: Feb 2005
Posts: 12
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
Reply With Quote
Forum Sponsor
  #2  
Old 02-14-2005
Registered User
 

Join Date: Feb 2005
Location: Victoria, BC.
Posts: 22
.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.
Reply With Quote
  #3  
Old 02-15-2005
Registered User
 

Join Date: Feb 2005
Posts: 12
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.
Reply With Quote
  #4  
Old 02-15-2005
Registered User
 

Join Date: Feb 2005
Location: Victoria, BC.
Posts: 22
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.
Reply With Quote
  #5  
Old 02-15-2005
Registered User
 

Join Date: Feb 2005
Posts: 12
Thank you

Hey gjduff, thanks a bunch! By the way your sn is very hard to pronounce 10 times in a row...try it
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:37 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0