Sponsored Content
Special Forums Hardware Filesystems, Disks and Memory Restricted File Creation for particuler pattern Post 302364462 by r00t4u on Friday 23rd of October 2009 06:46:09 AM
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..
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

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

8. 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

9. 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

10. 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
Tk_CreateWindow(3)					       Tk Library Procedures						Tk_CreateWindow(3)

__________________________________________________________________________________________________________________________________________________

NAME
Tk_CreateWindow, Tk_CreateWindowFromPath, Tk_DestroyWindow, Tk_MakeWindowExist - create or delete window SYNOPSIS
#include <tk.h> Tk_Window Tk_CreateWindow(interp, parent, name, topLevScreen) Tk_Window Tk_CreateAnonymousWindow(interp, parent, topLevScreen) Tk_Window Tk_CreateWindowFromPath(interp, tkwin, pathName, topLevScreen) Tk_DestroyWindow(tkwin) Tk_MakeWindowExist(tkwin) ARGUMENTS
Tcl_Interp *interp (out) Tcl interpreter to use for error reporting. If no error occurs, then *interp is not modified. Tk_Window parent (in) Token for the window that is to serve as the logical parent of the new window. const char *name (in) Name to use for this window. Must be unique among all children of the same parent. const char *topLevScreen (in) Has same format as screenName. If NULL, then new window is created as an internal window. If non- NULL, new window is created as a top-level window on screen topLevScreen. If topLevScreen is an empty string ("") then new window is created as top-level window of parent's screen. Tk_Window tkwin (in) Token for window. const char *pathName (in) Name of new window, specified as path name within application (e.g. .a.b.c). _________________________________________________________________ DESCRIPTION
The procedures Tk_CreateWindow, Tk_CreateAnonymousWindow, and Tk_CreateWindowFromPath are used to create new windows for use in Tk-based applications. Each of the procedures returns a token that can be used to manipulate the window in other calls to the Tk library. If the window could not be created successfully, then NULL is returned and interp->result is modified to hold an error message. Tk supports two different kinds of windows: internal windows and top-level windows. An internal window is an interior window of a Tk application, such as a scrollbar or menu bar or button. A top-level window is one that is created as a child of a screen's root window, rather than as an interior window, but which is logically part of some existing main window. Examples of top-level windows are pop-up menus and dialog boxes. New windows may be created by calling Tk_CreateWindow. If the topLevScreen argument is NULL, then the new window will be an internal win- dow. If topLevScreen is non-NULL, then the new window will be a top-level window: topLevScreen indicates the name of a screen and the new window will be created as a child of the root window of topLevScreen. In either case Tk will consider the new window to be the logical child of parent: the new window's path name will reflect this fact, options may be specified for the new window under this assumption, and so on. The only difference is that new X window for a top-level window will not be a child of parent's X window. For example, a pull-down menu's parent would be the button-like window used to invoke it, which would in turn be a child of the menu bar window. A dialog box might have the application's main window as its parent. Tk_CreateAnonymousWindow differs from Tk_CreateWindow in that it creates an unnamed window. This window will be manipulable only using C interfaces, and will not be visible to Tcl scripts. Both interior windows and top-level windows may be created with Tk_CreateAnonymousWin- dow. Tk_CreateWindowFromPath offers an alternate way of specifying new windows. In Tk_CreateWindowFromPath the new window is specified with a token for any window in the target application (tkwin), plus a path name for the new window. It produces the same effect as Tk_CreateWin- dow and allows both top-level and internal windows to be created, depending on the value of topLevScreen. In calls to Tk_CreateWin- dowFromPath, as in calls to Tk_CreateWindow, the parent of the new window must exist at the time of the call, but the new window must not already exist. The window creation procedures do not actually issue the command to X to create a window. Instead, they create a local data structure associated with the window and defer the creation of the X window. The window will actually be created by the first call to Tk_MapWindow. Deferred window creation allows various aspects of the window (such as its size, background color, etc.) to be modified after its creation without incurring any overhead in the X server. When the window is finally mapped all of the window attributes can be set while creating the window. The value returned by a window-creation procedure is not the X token for the window (it cannot be, since X has not been asked to create the window yet). Instead, it is a token for Tk's local data structure for the window. Most of the Tk library procedures take Tk_Window tokens, rather than X identifiers. The actual X window identifier can be retrieved from the local data structure using the Tk_WindowId macro; see the manual entry for Tk_WindowId for details. Tk_DestroyWindow deletes a window and all the data structures associated with it, including any event handlers created with Tk_CreateEven- tHandler. In addition, Tk_DestroyWindow will delete any children of tkwin recursively (where children are defined in the Tk sense, con- sisting of all windows that were created with the given window as parent). If tkwin is an internal window, then event handlers interested in destroy events are invoked immediately. If tkwin is a top-level or main window, then the event handlers will be invoked later, after X has seen the request and returned an event for it. If a window has been created but has not been mapped, so no X window exists, it is possible to force the creation of the X window by call- ing Tk_MakeWindowExist. This procedure issues the X commands to instantiate the window given by tkwin. KEYWORDS
create, deferred creation, destroy, display, internal window, screen, top-level window, window Tk 4.2 Tk_CreateWindow(3)
All times are GMT -4. The time now is 04:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy