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 06:50 PM
Human readable type vs MIME type detection using file spauldingsmails Shell Programming and Scripting 0 03-22-2007 12:43 AM
backing up file everytime script run and saving other backups knc9233 UNIX for Dummies Questions & Answers 4 01-29-2007 09:21 AM
Saving a vector to a file J.P High Level Programming 1 04-28-2002 03:28 AM
Saving a redirected file JSP UNIX for Dummies Questions & Answers 1 09-27-2001 07:52 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-14-2005
saswerks saswerks is offline
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
  #2 (permalink)  
Old 02-14-2005
gjduff gjduff is offline
Registered User
  
 

Join Date: Feb 2005
Location: Victoria, BC.
Posts: 24
.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.
  #3 (permalink)  
Old 02-15-2005
saswerks saswerks is offline
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.
  #4 (permalink)  
Old 02-15-2005
gjduff gjduff is offline
Registered User
  
 

Join Date: Feb 2005
Location: Victoria, BC.
Posts: 24
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.
  #5 (permalink)  
Old 02-15-2005
saswerks saswerks is offline
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
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:06 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0