I am trying to find all the world readable files on my system and then pipe the output to an LS command. However when I try to use the EXEC switch it fails... I am not sure what I am doing wrong here.
:/ftssuser/ctc03(63):>find ~ -perm -o=r -exec ls -al {}
FSUM6506 find: non-terminated "-exec" argument list
Usage: find directory ... expression
http://www.ibm.com/support/knowledgecen ... 0/find.htm
Here is the book entry for the find command ... I am sure I'm missing a terminating chracter.
If I drop the -exec I get the results I am expecting but I am missing the RWX bits and if it is a symbolic entry or not.
UNIX find command
-
- Global moderator
- Posts: 3720
- Joined: Sat Dec 19, 2009 8:32 pm
- Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
- Referer: other forum
- Location: Dubuque, Iowa, USA
Re: UNIX find command
The manual you linked to explicitly states that -exec requires a terminating semicolon (which needs to be escaped, it looks like). The manual also says to use white space around it. The find command you posted does not have any semicolons.
-
- Posts: 18
- Joined: Tue Sep 22, 2015 2:03 pm
- Skillset: Networking, Security, REXX, RACF
- Referer: Internet
Re: UNIX find command
Yeah I saw that and got further however now I get an entire ls listing .. basically skipping the {} .
-
- Posts: 18
- Joined: Tue Sep 22, 2015 2:03 pm
- Skillset: Networking, Security, REXX, RACF
- Referer: Internet
Re: UNIX find command
Ok I just figured out what I was doing wrong .. the root directory I was searching was also world read .. why I dont know .. but basically it was displaying all the contents of the directory then the individual files. Thanks for the help
-
- Similar Topics
- Replies
- Views
- Last post
-
-
Creating Unix Directory using COBOL in Unix 0n Z/OS
by Heisenberg » Mon Jun 26, 2023 4:36 pm » in IBM Cobol - 2
- 3032
-
by Robert Sample
View the latest post
Wed Jul 05, 2023 6:36 pm
-
-
- 1
- 2883
-
by Robert Sample
View the latest post
Sun Feb 20, 2022 8:04 pm
-
-
Calling Java program on UNIX/USS from a COBOL CICS program?
by zbius » Tue Nov 05, 2024 2:37 pm » in IBM Cobol - 2
- 2590
-
by zbius
View the latest post
Wed Nov 06, 2024 6:02 pm
-
-
-
REXX Code to find if PDS JCL member has how many DD
by abhilashanaik » Tue Sep 14, 2021 11:17 am » in CLIST & REXX - 5
- 2273
-
by sergeyken
View the latest post
Wed Sep 15, 2021 6:02 am
-
-
- 4
- 1405
-
by futohomok
View the latest post
Mon Oct 16, 2023 9:01 pm