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
DBS-EDIT-PATCH(1)						Debian Build System						 DBS-EDIT-PATCH(1)

NAME
dbs-edit-patch - Edit a DBS patch SYNOPSIS
dbs-edit-patch [options] patch dbs-edit-patch -h|--help DESCRIPTION
dbs-edit-patch is script to generate or modify patches for Debian source-packages in DBS format. WARNING
dbs is deprecated, please switch to the `3.0 (quilt)' Debian source package format instead. See http://wiki.debian.org/Projects/Deb- Src3.0#FAQ for a short guide how to do it. OPTIONS
-h, --help Show summary of options. -t dir, --tmpdir=dir Directory for the temporary files, default is /tmp or if set $TMP. -s dir, --sourcedir=dir Top level directory of the debian-package source-tree, default is the present working directory. -P dir, --sourcepatchdir=dir Directory containing upstream patches. -T dir, --sourcetardir=dir Directory containing the upstream tarball. -p level, --strip=level Striplevel -p of patch (Option -p of diff(1)), accepted values are 0 and 1, default is 0. ENVIRONMENT VARIABLES
TMP Sets the directory for the temporary files, can be overridden with -t dir. debian/vars dbs-edit-patch will automatically use variables defined in the optional debian/vars file. When a file debian/vars.in exists and debian/vars either does not exist or is older than any of the following files: debian/vars.in, debian/changelog, debian/rules or debian/control, then dbs-edit-patch will try updating the vars file by running the following command make -f debian/rules -W debian/vars.in debian/vars EXAMPLES
Edit the 021_debian patch of Heimdal: ~/heimdal-0.3d> dbs-edit-patch -t/tmp 021_debian Extracting source heimdal-0.3d.tar.gz ... successful. Applying patch 001_replay ... successful. etc. Copying heimdal-0.3d to heimdal-0.3d-old ... successful. Applying patch 021_debian ... successful. Edit files under /tmp/021_debian/heimdal-0.3d as required, then put a short description into /tmp/021_debian/patch-description if desired, and finally execute /tmp/021_debian/dbs-update-patch to save the results. Technical note: dbs-edit-patch extracts all patches before 021_debian into /tmp/021_debian/heimdal-0.3d, copies the result to /tmp/021_debian/heimdal-0.3d-old, and applies the last patch 021_debian (if it exists). Also, it creates a shell script which will create the diff between the old and new directories: ~/heimdal-0.3d> ls -la /tmp/021_debian total 12 -rwxr-xr-x 1 bam users 112 Jan 31 13:31 dbs-update-patch* -rw-r--r-- 1 bam users 0 Jan 31 13:31 patch-description drwxr-xr-x 14 bam users 4096 Jan 31 13:31 heimdal-0.3d/ drwxr-xr-x 14 bam users 4096 Jan 31 13:31 heimdal-0.3d-old/ drwxr-xr-x 5 bam users 4096 Jan 31 13:31 .stampdir/ ~/heimdal-0.3d> cat /tmp/021_debian/dbs-update-patch #!/bin/sh -e cd "/tmp/021_debian" HOOK_DIR="/usr/src/heimdal/debian/dbs-hooks" test -d "$HOOK_DIR" && run-parts "$HOOK_DIR" --arg update-patch-prediff find -name "*.bak" -print0 | xargs -0 --no-run-if-empty rm find -name "*~" -print0 | xargs -0 --no-run-if-empty rm : > new_patch test ! -e patch-description || cp patch-description new_patch diff -ruN heimdal-0.3d-old heimdal-0.3d >> new_patch || test $? -eq 1 mv new_patch /usr/src/heimdal/debian/patches/021_debian test -d "$HOOK_DIR" && run-parts "$HOOK_DIR" --arg update-patch-postdiff SEE ALSO
diff(1), dbs(7), /usr/share/doc/dbs/ AUTHOR
DBS was written by Adam Heath, modified by Ben Collins, modified and packaged for Debian by Brian May. This manpage was generated by Andreas Metzler and modified by Robert Luberda. Debian February 15th, 2011 DBS-EDIT-PATCH(1)
All times are GMT -4. The time now is 10:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy