I am Oracle Apps Tech guy, I have a requirement to find 777 permission is there or not for all Folders and Sub-folders
Under APPL_TOP (Folder/directory) with below conditions
i) the directory names should start with xx..... (like xxau,xxcfi,xxcca...etc)
and exclude the directory name if xxk...
ii)If any directory or Sub-directory do not have 777 permission it should print in a file.
Below is the sample structure in UNIX.
/appl_top/ls
au ap po ax xla xlp xxau xxcca xxcfi xxkin .....
under xxcfi there are some sub folders like
/appl_top/xxcfi/11.5.0>ls
admin bin log sql.........
please Don't mind if I am not posted exact what am asking, but my main aim is to list all Folders and Sub-folder which are not having 777 permissions.
A bit of an unusual request. One would think it would be of interest to find all the directories that are 777 so that they can be corrected and secured...
I think gagan4599 wants to print also subdirectories below "xx*" directories that have names other than "xx*", and your code finds only those starting with "xx".
bartus11 is correct under APPL_TOP i have directories like
au
po
xa
xpil
xxau
xxcfi
xxkin
xxcca
etc...
here i want only directories which are starting with "xx..." and it should not include "xxk..." directory.
after this there are some sub-directories these will not start with "xx..."
if I execute 'ls' command under "xxcfi" top list of sub-directories like below
ex: /appl_top/xxcfi/ls
admin
sql
bin
forms .... etc
note: any sub-directory name will not start with "xx.."
I need to execute the Unix command under APPL_TOP only.
When I execute command
find /appl_top -type d -name "xx*" -a ! -name "xxk*" | xargs -i find '{}' ! -perm 777
at different level am getting error please find below
qtcdev:/apps/qtcdev/appl_top> ! -name "xxk*" | xargs -i find '{}' ! -perm 777<
find: /appl_top: No such file or directory
qtcdev:/apps/qtcdev/appl_top>cd ..
qtcdev:/apps/qtcdev>" | xargs -i find '{}' ! -perm 777 <
find: /appl_top: No such file or directory
qtcdev:/apps/qtcdev>
As per the command it has to search only Directories which are starting with "xx..." but i got result above, here the "izu" directory should not come rite cause its not starting with "xx..."
Really I am very thankful for your support.