Thanks for all the input y'all. I think I've found a reasonable solution. I ended up with a nested for statement that looks like this:
for p in /u01 /u02 /home; do for i in `find $p -type f -uid +100`; do getfacl $i; done; done >> output.txt
I entered this on the command line. It loops through the directories /u01, /u02 and /home using the find command to search those directories for regular files (-type f) with uid greater than 100 (-uid +100). It then uses the results of that find command to get the ACL for each file found (getfacl $i) and send the output to ouptput.txt
If that nested for statement works for you, the following will do exactly the same thing much more efficiently and faster:
Dear friends,
please tell me how to find the files which are existing in the current directory, but it sholud not search in the sub directories..
it is like this,
current directory contains
file1, file2, file3, dir1, dir2
and dir1 conatins
file4, file5
and dir2 contains
file6,... (9 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
I want to list all files/lines which except those which contain the pattern ' /proc/' OR ' /sys/' (mind the leading blank).
In a first approach I coded:
find / -exec ls -ld {} | grep -v ' /proc/| /sys/' \; > /tmp/list.txt
But this doesn't work. I got an error (under Ubuntu):
grep:... (5 Replies)
Hi All,
I am new here but I have a scripting question that I can't seem to figure out with the "find" cmd.
What I am trying to do is to only have to run a single find cmd parsing the directories and output the different file types to induvidual files and I have been running into problems.... (3 Replies)
I am trying to find out which files in a group of files have lines ending in r. What I have is this:
cat /tmp/*RECORDS| if grep r$>/dev/null; then echo "yes";else echo"no";fi
Records is more than one file. There are the following files
TEST-RECORDS
/volume/testing
/volume/programs
... (2 Replies)
I have a bunch of random character lines like ABCEDFG. I want to find all lines with "A" and then change any "E" to "X" in the same line. ALL lines with "A" will have an "X" somewhere in it. I have tried sed awk and vi editor. I get close, not quite there. I know someone has already solved this... (10 Replies)
Friends,
Need someone's help in helping me with the below requirement for a script:
> For a list of servers(over 100+), I need to login into each of them(cannot configure password-less ssh) & grab few configuration details <
I know, this is possible through expect programming in a simple... (2 Replies)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Hello all!
I'm pretty new to bash scripting, so this should be a pretty easy question to solve.
For the last few hours, I've been creating a script that will list some of the following (based on a path I specify):
# of directories
# of files
# of executable files
files older than 365... (2 Replies)
These three finds worked as expected:
$ find . -iname "*.PDF"
$ find . -iname "*.PDF" \( ! -name "*_nobackup.*" \)
$ find . -path "*_nobackup*" -prune -iname "*.PDF"
They all returned the match:
./folder/file.pdf
:b:
This find returned no matches:
$ find . -path "*_nobackup*" -prune... (3 Replies)
Discussion started by: wolfv
3 Replies
LEARN ABOUT DEBIAN
calife.auth
CALIFE.AUTH(5) BSD File Formats Manual CALIFE.AUTH(5)NAME
calife.auth -- format of the calife authorization file
DESCRIPTION
The calife.auth files are files consisting of newline separated records, one per user, containing three colon (``:'') separated fields.
These fields are as follows:
name User's login name / @group.
shell User's shell
user1,user2,...,usern
List of logins allowed for the user name
The name field is the login used to access the computer account.
The login name must never begin with a hyphen (``-''); also, it is strongly suggested that neither upper-case characters or dots (``.'') be
part of the name, as this tends to confuse mailers. No field may contain a colon (``:'') as this has been used historically to separate the
fields in the user database.
One alternative syntax is to use @group to specify that any user in the given group is allowed to use calife to become root.
The shell field is the command interpreter the user prefers. If there is nothing in the shell field, the user's current shell as found in
the (/etc/passwd) file is assumed.
If the shell field is '*', then the account is considered as locked and access is denied.
If the third parameter is specified, it is assumed to be the list of login the current user has the right to become. It enables use of calife
for non-root only accounts.
calife.auth is placed in /etc.
EXAMPLE
# calife.auth-dist
#
# Format
#
# name[:shell_to_be_run][:user1,user2,usern]
#
fcb
roberto:/bin/tcsh
pb::guest,blaireau
SEE ALSO calife(1), su(1)HISTORY
A calife.auth file format appeared in DG/UX and SunOS, written for Antenne 2 in 1991. It has evolved with the extra shell specification. The
login list was reintroduced in 2.7.
AUTHOR
Ollivier Robert <roberto@keltia.frmug.fr.net>
BSD September 25, 1994 BSD