Sponsored Content
Top Forums Shell Programming and Scripting Find comand directories permissions Post 302965269 by Jose Luis on Tuesday 26th of January 2016 12:44:39 PM
Old 01-26-2016
Find comand directories permissions

Hi,


In the code below, while the "xarsg" command does not search in
"tavi_valo" subdir?


Code:
IAB00201:UG02222:EXPL> ls -1|xargs -IXX find XX -name tv_va_servbonos 2>/dev/null
UG02222/fuentes/TAVA/TAVA4E0000/backup/tv_va_servbonos
UG02222/fuentes/TAVA/TAVA4E0000/pendiente/va/tv_va_servbonos
UG02222/fuentes/TAVA/TAVA4O0000/bin/tv_va_servbonos
es/tvva/tuxedo/bin/tv_va_servbonos
IAB00201:UG02222:EXPL>
IAB00201:UG02222:EXPL> for dir in $(ls -1)
> do
> find $dir -name tv_va_servbonos 2>/dev/null
> done
UG02222/fuentes/TAVA/TAVA4E0000/backup/tv_va_servbonos
UG02222/fuentes/TAVA/TAVA4E0000/pendiente/va/tv_va_servbonos
UG02222/fuentes/TAVA/TAVA4O0000/bin/tv_va_servbonos
es/tvva/tuxedo/bin/tv_va_servbonos
tari_valo/valoracion/bin/tv_va_servbonos
tari_valo/valoracion/binseg/tv_va_servbonos
tari_valo/acep_plan/valoracion/tux/PTAVA230000/tv_va_servbonos
tari_valo/explotacion/his/PTAVA230000_1/tv_va_servbonos
tari_valo/explotacion/his/PTAVA160000_1/tv_va_servbonos
tari_valo/explotacion/his/PTAVA230000_TAVA280000_TAVA260000_TAVA300000_TAVA270000/tv_va_servbonos
IAB00201:UG02222:EXPL> ll -d . *
drwxr-xr-x  26 root     system         1024 Nov 28 2014  .
drwxr-xr-x   4 UG00000  aplic          1024 Sep 08 2006  UG00000
drwxr-xr-x  37 UG02222  aplic          4096 Jan 26 18:22 UG02222
drwxr-xr-x   3 2608     111              96 Nov 28 2014  cota
drwxr-xr-x   3 root     system           96 Feb 16 2005  ctm
drwxr-xr-x   4 dbtvva   dba              96 Apr 06 2005  datos
drwxr-xr-x  36 dbtvva   dba            1024 Jul 29 2014  datos_tvva
drwxr-xr-x   3 root     system           96 Apr 06 2005  es
drwxr-xr-x  23 dbtvva   dba            1024 Jul 29 2014  indices_tvva
drwxr-xr-x   2 root     system           96 Jan 25 23:00 lost+found
drwxrwxrwx   9 6663     504       321840128 Jan 26 18:41 nfs_aing
drwxr-x---   2 root     system           96 Jun 28 2012  nfs_aing_tmp
drwxrwxrwx   4 UG02222  tava           1024 Mar 06 2013  nfsiab00201
drwxr-xr-x   4 UG02222  aplic            96 Jul 11 2005  nfsiab00201_old
drwxr-xr-x  15 root     bin            1024 Dec 11 23:00 openv
drwxr-xr-x  20 dbtvva   dba            1024 Jul 10 2012  oracle
drwxr-xr-x   2 root     sys              96 Feb 16 2005  patrol
drwxr-xr-x   7 pcms     pcmsdba        1024 May 24 2005  pcms
drwxr-xr-x   3 UG00000  repl             96 Apr 06 2005  replica
drwxrwxrwx   2 usbtava  tava             96 Jul 29 2014  sota
drwxr-xr-x   3 root     system           96 May 04 2005  spazio
drwxr-xr-x  20 UG02222  tava           1024 Jun 17 2014  tari_valo
drwxr-xr-x 736 ust0001  tuxedo        16384 Jan 18 11:58 users
drwxr-xr-x   3 root     system           96 Apr 11 2005  usr0001
drwxr-xr-x   5 USS0080  dba              96 Feb 02 2007  vi3
IAB00201:UG02222:EXPL> id
uid=206(UG02222) gid=201(tava) groups=206(aplic)


Thanks in advance,
Jose Luis
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Permissions for Directories and Subdirectories

Is it possible to have a directory owned (by root) with permissions drwx------ and then have a sub directory of rwxrwxrwx. I know that this may be soo simple but I had no luck googling it. Thanks for your help (1 Reply)
Discussion started by: clancymf
1 Replies

2. Shell Programming and Scripting

Need help in changing Permissions to 775 for files and directories

Hi All I need to create a script which would change Permissions to 775 All the Files and directories will be mentioned in the Paramter files Can anyone give a Hint how to proceed in this ?? THanks (1 Reply)
Discussion started by: ranga27
1 Replies

3. Ubuntu

Newbie, Directories permissions

Basicly im trying to edit a file for apache2 in /var/etc/apache2 and i dont have permissions, my login name is associated with root but i still can't do anything, Does anyone have any ideas? Thanks in advance! (3 Replies)
Discussion started by: sypherz
3 Replies

4. UNIX for Dummies Questions & Answers

how to change permissions only to files, not directories....?

Hi, I am really new to unix, any help is much appreciated. I need to change permissions of all files under several subdirectories to 700 but keep directories readable (755). Why ? Because I need a FTP user to only list his files and can't read them. But to browse to subfolder, the directories... (3 Replies)
Discussion started by: narrok
3 Replies

5. Solaris

find and sed comand for Solaris 9

Hi, I'm looking to combine the two commands find and sed together for the work that i'm worknig on. I need to find the ip addresse in any file from current directory and below, once is found i need to replace it with new ip addresse. Here is what i have but not complete. Find IP from... (4 Replies)
Discussion started by: lamoul
4 Replies

6. Shell Programming and Scripting

Create duplicate directories with same permissions

Hi all, I need to create duplicate directories and sub directories (only the directories not the files or file contents) with the same permissions. Can some one guide me in doing this. I could able to create but here the permissions should be the same how can i do this in linux. Thanks in... (5 Replies)
Discussion started by: Olivia
5 Replies

7. UNIX for Dummies Questions & Answers

Using grep command to find the pattern of text in all directories and sub-directories.

Hi all, Using grep command, i want to find the pattern of text in all directories and sub-directories. e.g: if i want to search for a pattern named "parmeter", i used the command grep -i "param" ../* is this correct? (1 Reply)
Discussion started by: vinothrajan55
1 Replies

8. Shell Programming and Scripting

Compare the Permissions for all the scripts that exists in two Directories

Hello All, I am in the process of finding the permissions on all the files that exists in two directories: Dir1: PROD_Scripts/* Dir2: STAGE_Scripts/* Both the Directories have some shell and perl scripts respectively. Step1: Finding all the Scripts that exists in PROD but Not in STAGE.... (2 Replies)
Discussion started by: filter
2 Replies

9. Shell Programming and Scripting

Find only files/directories with different permissions/owners

My git post-update has the following lines in it to make sure the permissions are set right: find /usr/local/apache/htdocs -type d -print0 | xargs -0 chmod 755 find /usr/local/apache/htdocs -type f -print0 | xargs -0 chmod 644 chown -R apache:apache /usr/local/apache/htdocsThe only problem is... (5 Replies)
Discussion started by: dheian
5 Replies

10. AIX

Permissions on directories and files

Hello, I have a main directory called /test123 /test123 has lot of sub-directories and files. drwxr-x--- 21 root system 4096 Jan 25 10:20 /test123 Here, "other" does not have any access to /test123 folder. How can we provide read-only access to others on /test123... (1 Reply)
Discussion started by: aaron8667
1 Replies
DH_INSTALLDEB(1)						     Debhelper							  DH_INSTALLDEB(1)

NAME
dh_installdeb - install files into the DEBIAN directory SYNOPSIS
dh_installdeb [debhelperoptions] DESCRIPTION
dh_installdeb is a debhelper program that is responsible for installing files into the DEBIAN directories in package build directories with the correct permissions. FILES
package.postinst package.preinst package.postrm package.prerm These maintainer scripts are installed into the DEBIAN directory. Inside the scripts, the token #DEBHELPER# is replaced with shell script snippets generated by other debhelper commands. package.triggers package.shlibs These control files are installed into the DEBIAN directory. Note that package.shlibs is only installed in compat level 9 and earlier. In compat 10, please use dh_makeshlibs(1). package.conffiles This control file will be installed into the DEBIAN directory. In v3 compatibility mode and higher, all files in the etc/ directory in a package will automatically be flagged as conffiles by this program, so there is no need to list them manually here. package.maintscript Lines in this file correspond to dpkg-maintscript-helper(1) commands and parameters. However, the "maint-script-parameters" should not be included as debhelper will add those automatically. Example: # Correct rm_conffile /etc/obsolete.conf 0.2~ foo # INCORRECT rm_conffile /etc/obsolete.conf 0.2~ foo -- "$@" In compat 10 or later, any shell metacharacters will be escaped, so arbitrary shell code cannot be inserted here. For example, a line such as "mv_conffile /etc/oldconffile /etc/newconffile" will insert maintainer script snippets into all maintainer scripts sufficient to move that conffile. It was also the intention to escape shell metacharacters in previous compat levels. However, it did not work properly and as such it was possible to embed arbitrary shell code in earlier compat levels. The dh_installdeb tool will do some basic validation of some of the commands listed in this file to catch common mistakes. The validation is enabled as a warning since compat 10 and as a hard error in compat 12. SEE ALSO
debhelper(7) This program is a part of debhelper. AUTHOR
Joey Hess <joeyh@debian.org> 11.1.6ubuntu2 2018-05-10 DH_INSTALLDEB(1)
All times are GMT -4. The time now is 06:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy