Visit Our UNIX and Linux User Community


Restricted File Creation for particuler pattern


 
Thread Tools Search this Thread
Special Forums Hardware Filesystems, Disks and Memory Restricted File Creation for particuler pattern
# 1  
Old 10-23-2009
Restricted File Creation for particuler pattern

HI All, I have this wierd requirment. Any help will be appriciated.

I need to restrict file creation with certain pattern. Suppose, i want my system not to allow creation of files with *.exe extension. The requirment is that file should not be created like it happen in windows you can't create file with name "com, lpr etc etc" same thing i need in unix/linux..i want to create a rule saying that this system will not accept any file name ending with *.exe and *.txt.

Please advice..

Previous Thread | Next Thread
Test Your Knowledge in Computers #1008
Difficulty: Medium
A power series will converge for some values of the variable x and may diverge for others.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to print the specific part of the file name with file creation date?

Hello Folks, I have an requirement, where i need to get total count of the file based on creation date with there filename selected pattern. Filename: MobileProtocol.20171228T154200.157115.udr I want to get the count of files created on each day based on a pattern find. find . -type... (7 Replies)
Discussion started by: sadique.manzar
7 Replies

2. UNIX Desktop Questions & Answers

Restricted shell with execution permission on a file

Hi, I've created a user which shell is the restricted one (/usr/lib/rsh), but I've realized that the user cannot execute a script !!! The scope was to allow the ssh access to a user that could not access to any other directories but there that user should be able to run a script that retrieves ... (2 Replies)
Discussion started by: mary0
2 Replies

3. Shell Programming and Scripting

Big pattern file matching within another pattern file in awk or shell

Hi I need to do a patten match between files . I am new to shell scripting and have come up with this so far. It take 50 seconds to process files of 2mb size . I need to tune this code as file size will be around 50mb and need to save time. Main issue is that I need to search the pattern from... (2 Replies)
Discussion started by: nitin_daharwal
2 Replies

4. UNIX for Dummies Questions & Answers

List the directories, having given pattern in the directories name, sorted by creation date

It is for HP-Unix B.11.31. Requirement: 1. List the directories, having given pattern in the directories name, sorted by creation date. Example: Directories with name "pkg32*" or "pkg33*" 2. On the output of 1. list the directories by creation date as sort order, with creation date... (2 Replies)
Discussion started by: Siva SQL
2 Replies

5. Shell Programming and Scripting

Restricted File Comparison

Hey guys, I've got a scripting problem that has been bugging me so thought I'd ask the wise people here! Basically I have two overlapping log files, and I want to get the newest lines from the new log file that aren't in the old log file - but not the old lines in the old log that aren't in the... (1 Reply)
Discussion started by: salamagd
1 Replies

6. Shell Programming and Scripting

File creation

Hi I need to write a file with value value from Paramer which is passed from datastage. It should overwrite the file if already exists. Can anybody provide command for this? (1 Reply)
Discussion started by: cnrj
1 Replies

7. Shell Programming and Scripting

Help with creating a text file in perl with file creation date.

Hi, I am quite new to Perl scripting and i need to create a .TXT file using perl, with fields (A,B,C,D,E), and this text file should be named with current file creation date "XYZ_CCYYMMDD.TXT" (i.e.XYZ_2011042514:33 PM). Can anyone who has done this, please share their expertise on this... (5 Replies)
Discussion started by: msrahman
5 Replies

8. Solaris

gzip a file and append creation date stamp to file

I want to gzip a file and append the creation date to the end of the file. How can I accomplish this task. Basically they are log files which need a creation date stamp appended to make sure they do not overwrite other log files. -jack (3 Replies)
Discussion started by: jacktravine
3 Replies

9. UNIX for Advanced & Expert Users

file creation

Hi, Is there any way to restrict directories with one type of file creation. regards. (8 Replies)
Discussion started by: guguli
8 Replies

10. Linux

creation of a file

how to create a file with the same modification time as another file is having using the copy command? (1 Reply)
Discussion started by: infyanurag
1 Replies
DIRVISH-LOCATE(1)					      General Commands Manual						 DIRVISH-LOCATE(1)

NAME
dirvish-locate - locate file versions in dirvish images SYNOPSIS
dirvish-locate vault[:branch] pattern DESCRIPTION
Locate versions of files in a dirvish vault The index of each image specified vault is searched for paths matching pattern. Each path found matching the pattern will be reported fol- lowed by a modification time of each version of the file and all images having a link to it. The optional branch specification will restrict searching to the specified branch. Images with an error status will be skipped as will any without index files. The index file may be compressed by gzip or bzip2. See tree and index in dirvish.conf(5) for details. The pattern is a perl regular expression to match the final component of the path. Append .* to the end of the pattern if you wish to match any substring of the whole path or $ if you wish to anchor the pattern to the end of the path. See perlre(1) for details. Directories are excluded from matching as they would wind up matching every file within them anyway. Symlinks are also excluded from matching. If the pattern matches too many paths dirvish-locate will only report the paths matched and not versions. As a sanity check if the number of matches is really excessive dirvish-locate will limit the number of images searched. Excessive matches is an indication of an insuffi- ciently specific pattern. Use the resulting path list to compose a more specific one. EXIT CODES
To facilitate further automation and integration of dirvish-locate with other tools dirvish-locate provides rationalised exit codes. The exit codes are range based. While the code for a specific error may change from one version to another it will remain within the specified range. So don't test for specific exit codes but instead test for a range of values. To the degree possible higher value ranges indicate more severe errors. 0 success 200-219 An error was encountered in loading a configuration file. 220-254 An error was detected in the configuration. 255 Incorrect usage. FILES
/etc/dirvish/master.conf alternate master configuration file. /etc/dirvish.conf master configuration file. bank/vault/image/summary image creation summary. bank/vault/image/index bank/vault/image/index.gz bank/vault/image/index.bz2 dirvish index file. SEE ALSO
dirvish.conf(5) BUGS
DIRVISH-LOCATE(1)

Featured Tech Videos