Command running for all recursive files


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Command running for all recursive files
# 1  
Old 07-20-2011
Command running for all recursive files

hi,
I have installed ACL(access control list) in my ubuntu box in order to know which all are the users having permissions to read and write the files;

If u run the command like;
$getfacl /root/
It will give following output:
# file: root/
# owner: root
# group: root
user::rwx
user:fstl:r-x
user:ajay:r-x
group::---
mask::r-x
other::---

I want to run a shell script that wll do "getfacl /root/" for all subdirectories and files inside /root/ folder such that it will give me users authorized for respective files.
and the output of the format should be a single line rather than the block output so that it will be easy to store results in single file.
Please help me out in this guys.Its urgent

Thnks,
ajay
# 2  
Old 07-20-2011
Quote:
Originally Posted by ajaypadvi
hi,
I have installed ACL(access control list) in my ubuntu box in order to know which all are the users having permissions to read and write the files;

If u run the command like;
$getfacl /root/
It will give following output:
# file: root/
# owner: root
# group: root
user::rwx
user:fstl:r-x
user:ajay:r-x
group::---
mask::r-x
other::---

I want to run a shell script that wll do "getfacl /root/" for all subdirectories and files inside /root/ folder such that it will give me users authorized for respective files.
and the output of the format should be a single line rather than the block output so that it will be easy to store results in single file.
Please help me out in this guys.Its urgent

Thnks,
ajay
Hi,
need to display all subdirectory and files permission in particular dir??
so that you can use awk.

Cheers,
RangaSmilie
# 3  
Old 07-20-2011
Hi;
Thnks for ur reply
But here the scenario is we are assigning multiple users to lets say particular directory using ACL but in awk those multiple users wont come..in addition i need to have those permissions assigned for user on single file too.that is why i am using getfacl.
Thnks;
ajay
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Recursive remove files

Hi folks, I have several directories with multiple files of all kinds in them. For example directory ###### contains: ######B1.TIF ######B2.TIF ........... ######B8.TIF ######.tar ######.txt ######.jpg ######r ######r.hdr ######rSVD ######rSVD.hdr ######t ######t.hdr How do I... (8 Replies)
Discussion started by: spirospap
8 Replies

2. Shell Programming and Scripting

Can I skip files when running rm command

Platform: Oracle Enterprise Linux 6.2 I have several files like below. I want to remove all files except one file For example , I want to remove all the files below except dasd_91197.trc $ ls -alrt *.trc -rw-r----- 1 ecmdev wms 8438784 May 7 21:30 dasd_91177.trc -rw-r----- 1 ecmdev wms ... (3 Replies)
Discussion started by: John K
3 Replies

3. UNIX for Dummies Questions & Answers

Non Recursive Find Command

Hello Unix Gurus, I am using the following find commands: 1) find Input_Path -name '*.' -exec mv -f {} Outputpath \; 2) find Inputpath -name '*.' -exec cp {} Outputpath \; 3) find Somepath -name '*.' Now the problem is my Unix version does not support maxdepth Option for find... (7 Replies)
Discussion started by: pchegoor
7 Replies

4. Solaris

date command, loop/recursive

is it possible to use output of one date command as input of another? I would like to know the date of Monday two weeks ago. so, the idea is that one date command subtracts two weeks, and the other finds the Monday. (2 Replies)
Discussion started by: orange47
2 Replies

5. Shell Programming and Scripting

Help with recursive command

Hi, I need help with recursive function. This is not a part of any homework or classroom related. I am trying to learn unix and working on a question posted on site. basically i have to create a script which does what rm -r does. my code so far: 1 #!/bin/bash 2 3 function recursive... (2 Replies)
Discussion started by: bluebird13
2 Replies

6. Shell Programming and Scripting

Running rename command on large files and make it faster

Hi All, I have some 80,000 files in a directory which I need to rename. Below is the command which I am currently running and it seems, it is taking fore ever to run this command. This command seems too slow. Is there any way to speed up the command. I have have GNU Parallel installed on my... (6 Replies)
Discussion started by: shoaibjameel123
6 Replies

7. UNIX for Dummies Questions & Answers

help with recursive copy command

Hi Guys, I am experiencing a problem right now while copying a directory as well as its subdirectories to my target directory. I know this is a very simple UNIX command using cp -R source directory target directory. but unfortunatley while doing this an error comes up on the command line saying... (2 Replies)
Discussion started by: Knowledge_Xfer
2 Replies

8. UNIX for Advanced & Expert Users

Non recursive find command

Hi, I have question is related to find command. I want to find command should search in current folder only not recursive mode(sub-folders). I found a one way of, find . \( -name success -prune \) -o -name "Rajini*" How ever, my current folder is having lots sub-folders and am not... (7 Replies)
Discussion started by: Nagapandi
7 Replies

9. Shell Programming and Scripting

Running a command on multiple selected files in nautilus script

I am trying to make a script to convert drg files to wav and so far i have this #!/bin/bash drg2sbg "$*" -o "$*".sbg sbagen -Wo "/home/nick/Desktop/I-Doser Wave Files/"$*"" "$*".sbg rm "$*".sbg cd "/home/nick/Desktop/I-Doser Wave Files" rename 's/\.drg$/\.wav/' *.drg exit the drg2sbg and... (2 Replies)
Discussion started by: Nickbowlingdude
2 Replies

10. Shell Programming and Scripting

running files consecutively with one command

i want to run few c object files one after another in one command. Can i write a acript for that. I'm using Sun Solaris. for example ./prog < input1 >output1 & ./prog <input2 >output2 & i want the first to finish before starting the nest one and run them in the back ground thanks.... (5 Replies)
Discussion started by: narom
5 Replies
Login or Register to Ask a Question