Sponsored Content
Top Forums UNIX for Advanced & Expert Users help on find with chmod.. urgent help needed Post 67852 by sdlayeeq on Monday 28th of March 2005 06:46:34 PM
Old 03-28-2005
Is there a better way of doing the same task

Thanks borg.. I applied the same solution -depth.. I could see the problem, I can only run it once. The next time the same command will not be executed as it will not have execute permission. Is there a better way of doing the same task.
bye
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

urgent help needed !!

i have a script, which is continuously looping. i want to view the script name when i use ps command... it is only showing -sh ... UID PID PPID C STIME TTY TIME COMMAND informix 8533 20923 0 18:19:28 pts/ta 0:00 -sh but i dont have my scriptname displayed .... how can i do that my script is... (0 Replies)
Discussion started by: guhas
0 Replies

2. Shell Programming and Scripting

urgent help needed.

Ok I admit it I am stumped and I would appreciate any and all help Here is what I am trying to do. Korn Shell script I am setting a variable to another shell script that I want to invoke in my main script like so: GETDIR=/vol100/cfg/.getdir The .getdir shell script take a parameter,... (4 Replies)
Discussion started by: Batch
4 Replies

3. Shell Programming and Scripting

FIND/CHMOD combined

I am trying to change permission for all subdirectories and files inside folder1 so this is what i came with after many seraches on the internet. man find and man chmod mirc and few articles. find .public_html/folder1 -print0 | xargs -0 chmod 777 what's wrong with this command? it is FTP... (33 Replies)
Discussion started by: smoother
33 Replies

4. Windows & DOS: Issues & Discussions

Urgent XP help needed Please

Hi, Please accept my apologies if I have not explained anything clearly enough but i am a little old on new lingo!!! I am running XP from home and last night the following happened. After being logged on for pretty much the full day, I had what seemed like a pop up come up. Although most pop... (3 Replies)
Discussion started by: nike1601
3 Replies

5. UNIX for Advanced & Expert Users

Urgent help needed!!!

-------------------------------------------------------------------------------- hy guys, i got few interview questions i need someone to answer urgently: 1)If you cant get to the root, you try to fsck it, but gets errors to read file systems. What steps do you take to recover the host... (1 Reply)
Discussion started by: charneet
1 Replies

6. Shell Programming and Scripting

Urgent Help Needed.

Hi, Below is my issue which I desperately need and I want a shell script which can do this job. I need this script as I m planning to put this for a system health check. Please assist me. 1. There are 10 log files in a particular location. 2. open each log file. Goto to the end of the... (1 Reply)
Discussion started by: kashriram
1 Replies

7. Shell Programming and Scripting

Urgent Help needed please

Hi, I have a small grepping problem in my script.I am having a file from which i need to make sure "#^A17" is the last updation (Next # can be ignored) before ################.The idea behind this is, if this file contains "A17" as the last updation, i need to do a particular activity. please... (7 Replies)
Discussion started by: Renjesh
7 Replies

8. Shell Programming and Scripting

Find and automatically chmod

Hello everyone, my friend is asking for yOur Help. He is asking the script for combined find and changemode utility... Thank you (4 Replies)
Discussion started by: iennetastic
4 Replies

9. Shell Programming and Scripting

Urgent Help needed !!!

Hi, I have a directory, where i get 4 files for each day... The files will be generated at any time. I am trying for a shell script for copying the file from this directory whenever new file is generated. Say for example : If the directory X has following files A1,A2,A3,A4,B1,B2,B3,B4...... (2 Replies)
Discussion started by: krishh.kk
2 Replies

10. Shell Programming and Scripting

Urgent Help needed...

Hi I want to create a script which deleted files in the following folders older than 30 days. There are a particular version of files inside it to be deleted Folders : /files0/interfaces/ResponsysSavedList/BackInStock/EmailContent/backup... (3 Replies)
Discussion started by: Scudza
3 Replies
FEXECVE(3)                                                   Linux Programmer's Manual                                                  FEXECVE(3)

NAME
fexecve - execute program specified via file descriptor SYNOPSIS
#include <unistd.h> int fexecve(int fd, char *const argv[], char *const envp[]); Feature Test Macro Requirements for glibc (see feature_test_macros(7)): fexecve(): Since glibc 2.10: _POSIX_C_SOURCE >= 200809L Before glibc 2.10: _GNU_SOURCE DESCRIPTION
fexecve() performs the same task as execve(2), with the difference that the file to be executed is specified via a file descriptor, fd, rather than via a pathname. The file descriptor fd must be opened read-only (O_RDONLY) or with the O_PATH flag and the caller must have permission to execute the file that it refers to. RETURN VALUE
A successful call to fexecve() never returns. On error, the function does return, with a result value of -1, and errno is set appropri- ately. ERRORS
Errors are as for execve(2), with the following additions: EINVAL fd is not a valid file descriptor, or argv is NULL, or envp is NULL. ENOSYS The /proc filesystem could not be accessed. VERSIONS
fexecve() is implemented since glibc 2.3.2. ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7). +----------+---------------+---------+ |Interface | Attribute | Value | +----------+---------------+---------+ |fexecve() | Thread safety | MT-Safe | +----------+---------------+---------+ CONFORMING TO
POSIX.1-2008. This function is not specified in POSIX.1-2001, and is not widely available on other systems. It is specified in POSIX.1-2008. NOTES
On Linux with glibc versions 2.26 and earlier, fexecve() is implemented using the proc(5) filesystem, so /proc needs to be mounted and available at the time of the call. Since glibc 2.27, if the underlying kernel supports the execveat(2) system call, then fexecve() is implemented using that system call, with the benefit that /proc does not need to be mounted. The idea behind fexecve() is to allow the caller to verify (checksum) the contents of an executable before executing it. Simply opening the file, checksumming the contents, and then doing an execve(2) would not suffice, since, between the two steps, the filename, or a direc- tory prefix of the pathname, could have been exchanged (by, for example, modifying the target of a symbolic link). fexecve() does not mit- igate the problem that the contents of a file could be changed between the checksumming and the call to fexecve(); for that, the solution is to ensure that the permissions on the file prevent it from being modified by malicious users. The natural idiom when using fexecve() is to set the close-on-exec flag on fd, so that the file descriptor does not leak through to the program that is executed. This approach is natural for two reasons. First, it prevents file descriptors being consumed unnecessarily. (The executed program normally has no need of a file descriptor that refers to the program itself.) Second, if fexecve() is used recur- sively, employing the close-on-exec flag prevents the file descriptor exhaustion that would result from the fact that each step in the recursion would cause one more file descriptor to be passed to the new program. (But see BUGS.) BUGS
If fd refers to a script (i.e., it is an executable text file that names a script interpreter with a first line that begins with the char- acters #!) and the close-on-exec flag has been set for fd, then fexecve() fails with the error ENOENT. This error occurs because, by the time the script interpreter is executed, fd has already been closed because of the close-on-exec flag. Thus, the close-on-exec flag can't be set on fd if it refers to a script, leading to the problems described in NOTES. SEE ALSO
execve(2), execveat(2) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. Linux 2017-09-15 FEXECVE(3)
All times are GMT -4. The time now is 04:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy