Sponsored Content
Top Forums UNIX for Dummies Questions & Answers chmod 777 on all directories below...how do I do that using the "find" command? Post 2780 by Neko on Monday 4th of June 2001 06:31:59 AM
Old 06-04-2001
Thank you very much


Thank you very much. That just saved me a tonne of work Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Listing only directories in the current working directory using the "ls" command

Hello All, I am trying to list only directories in my current directory using the command "ls -d". But the output only contains the default directory "." and doesn't list the rest of the directories in the working directory. Can anyone explain why this is happening (2 Replies)
Discussion started by: igandu
2 Replies

2. Shell Programming and Scripting

bash: cd command to access "strange" directories

I have a problem using bash. Simply, I cannot find the right command (if there's one!) to enter in the "- Arch_02 -" directory. As you can see, the name begins with a hyphen and this is causing some trouble: localhost arch2 # pwd /mnt/arch2 localhost arch2 # ls -l total 4 dr-x------ 1 root... (3 Replies)
Discussion started by: robotronic
3 Replies

3. Shell Programming and Scripting

"find command" to find the files in the current directories but not in the "subdir"

Dear friends, please tell me how to find the files which are existing in the current directory, but it sholud not search in the sub directories.. it is like this, current directory contains file1, file2, file3, dir1, dir2 and dir1 conatins file4, file5 and dir2 contains file6,... (9 Replies)
Discussion started by: swamymns
9 Replies

4. UNIX for Dummies Questions & Answers

Using "find" in restricted directories

Hi, I would like to know is there any way to find/search filenames or directories inside the directories which has resticted permission. When we use normal "find" command it returns "permission denied" message for the root directories or directories with restricted permissions. Thanks (2 Replies)
Discussion started by: forstudy3
2 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. Shell Programming and Scripting

Problem with "find" and "grep" command

I want to list all files/lines which except those which contain the pattern ' /proc/' OR ' /sys/' (mind the leading blank). In a first approach I coded: find / -exec ls -ld {} | grep -v ' /proc/| /sys/' \; > /tmp/list.txt But this doesn't work. I got an error (under Ubuntu): grep:... (5 Replies)
Discussion started by: pstein
5 Replies

7. AIX

find command to list all the 777 files and directories owned by root user

Hi I'm logged in to an AIX box now and we need to do an audit on this box. cbssapr01:# pwd / Which command will show all the files and directories owned by root user with permissions as 777 ? (8 Replies)
Discussion started by: newtoaixos
8 Replies

8. Shell Programming and Scripting

Find lines with "A" then change "E" to "X" same line

I have a bunch of random character lines like ABCEDFG. I want to find all lines with "A" and then change any "E" to "X" in the same line. ALL lines with "A" will have an "X" somewhere in it. I have tried sed awk and vi editor. I get close, not quite there. I know someone has already solved this... (10 Replies)
Discussion started by: nightwatchrenba
10 Replies

9. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

10. Shell Programming and Scripting

find . -path "*_nobackup*" -prune -iname "*.PDF" \( ! -name "*_nobackup.*" \)

These three finds worked as expected: $ find . -iname "*.PDF" $ find . -iname "*.PDF" \( ! -name "*_nobackup.*" \) $ find . -path "*_nobackup*" -prune -iname "*.PDF" They all returned the match: ./folder/file.pdf :b: This find returned no matches: $ find . -path "*_nobackup*" -prune... (3 Replies)
Discussion started by: wolfv
3 Replies
setreuid(2)							System Calls Manual						       setreuid(2)

Name
       setreuid - set real and effective user ID's

Syntax
       setreuid(ruid, euid)
       intruid, euid;

Description
       The  real  and  effective  user	ID's of the current process are set according to the arguments.  If ruid or euid is -1, the current uid is
       filled in by the system.

Return Values
       Upon successful completion, a value of zero (0) is returned.  Otherwise, a value of -1 is returned and errno is set to indicate the error.

Environment
       BSD
       If the process is superuser, or and matches with the real user ID, the effective user ID, or the saved set-user-id (as described in ), then
       the real, effective, and the saved set-user-id are set to and respectively.

       POSIX
       SYSTEM-FIVE
       When  your  program  is	compiled  in the POSIX or SYSTEM-FIVE mode, if both arguments to are -1, the system call returns a value of -1 and
       errno is set to [EINVAL].

       The following semantics apply when using the function:

       If the process is the superuser, the real, effective, and saved set-user-id (as described in ) are set to and respectively.

       If the process is not the superuser, but the and matches with the real user ID, the effective user ID (only  in	the  SYSTEM-FIVE  and  BSD
       environments), or the saved set-user-id, then the effective ID is set to The  real user ID and the saved set-user-id are left unchanged.

Diagnostics
       [EPERM]	      The  current  process is not the superuser and the and specified does not match with the real user ID, the effective user ID
		      (only in SYSTEM-FIVE and BSD environment), or the saved set-user-id.

See Also
       getuid(2), setregid(2), setuid(3)

																       setreuid(2)
All times are GMT -4. The time now is 04:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy