05-07-2009
find works by calling either ftw() or nftw() - these functions traverse a file tree, and return the results from a stat() call for every file found.
stat is a system call that returns metadata about a file - size, last modification date, permissions, etc. I/O errors occur when the filesystem metadata has a problem or the disk(s) has bad sectors, etc.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
problem String
~~~~~~~~~~~~~~~~~~
icecream= { smart peopleLink "good" LC "happy" ,
smartpeopleLink "dull" LC "sad" }
aend = {smart vc4 eatr kalu}
output needed
~~~~~~~~~~~~~~~~~~
smart peopleLink "good" LC "happy" , smartpeopleLink "dull" LC "sad"
smart vc4... (4 Replies)
Discussion started by: keshav_rk
4 Replies
2. Shell Programming and Scripting
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)
Discussion started by: swamymns
9 Replies
3. Solaris
Hi All,
I am getting an error message when I execute command “zlogin -C sunsrv4z5” on my root server.
INIT: Cannot stat /etc/inittab, errno: 2
INIT: Cannot stat /etc/inittab, errno: 2
As per my analysis it seems that some files inside /etc folder are deleted.
This server was... (14 Replies)
Discussion started by: surbhit4u
14 Replies
4. Shell Programming and Scripting
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)
Discussion started by: shis100
7 Replies
5. Shell Programming and Scripting
So, my third thread here ^^ and still asking questions.
Thanks for you patience and help, I really appreciated it ;)
I currently use a shell script to move folders of songs from one to another location on my harddrive.
I use something like this:
sudo mv /var/mobile/Media/"My Music"/"Vasco... (3 Replies)
Discussion started by: pasc
3 Replies
6. Shell Programming and Scripting
I have a bash script that has been running (on SUSE 9.3) dozens of times over the past couple of years without error. Recently it has been hitting intermittent “cp: cannot stat FILE: No such file or directory” errors.
The script has nested loops that continuously process files in a... (2 Replies)
Discussion started by: jcart
2 Replies
7. AIX
i would like to know the equivalent of stat -c %Y <file> command in AIX.
i tried "istat" but its not giving the epoch time and also tried with perl
perl -le'printf "%o", 07777 & (stat) for @ARGV' <file>
it not also provding the timing .
... (3 Replies)
Discussion started by: expert
3 Replies
8. Shell Programming and Scripting
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)
Discussion started by: nightwatchrenba
10 Replies
9. UNIX for Dummies Questions & Answers
Hi.
I'm trying to install VMWare Workstation to run a virtual machine on my Mac OS, but running the bundle from bash(xterm)
sh VMware-workstation-Full-11.0.0-2305329.x86_64.bundle
(as suggested in install guide)
comes up with error:stat: illegal option -- -
usage: stat
Digging... (5 Replies)
Discussion started by: defeated
5 Replies
10. Shell Programming and Scripting
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 CENTOS
pam_console
pam_console(8) System Administrator's Manual pam_console(8)
NAME
pam_console - determine user owning the system console
SYNOPSIS
session optional pam_console.so
auth required pam_console.so
DESCRIPTION
pam_console.so is designed to give users at the physical console (virtual terminals and local xdm-managed X sessions by default, but that
is configurable) capabilities that they would not otherwise have, and to take those capabilities away when the are no longer logged in at
the console. It provides two main kinds of capabilities: file permissions and authentication.
When a user logs in at the console and no other user is currently logged in at the console, pam_console.so will run handler programs speci-
fied in the file /etc/security/console.handlers such as pam_console_apply which changes permissions and ownership of files as described in
the file /etc/security/console.perms. That user may then log in on other terminals that are considered part of the console, and as long as
the user is still logged in at any one of those terminals, that user will own those devices. When the user logs out of the last terminal,
the console may be taken by the next user to log in. Other users who have logged in at the console during the time that the first user was
logged in will not be given ownership of the devices unless they log in on one of the terminals; having done so on any one terminal, the
next user will own those devices until he or she has logged out of every terminal that is part of the physical console. Then the race can
start for the next user. In practice, this is not a problem; the physical console is not generally in use by many people at the same time,
and pam_console.so just tries to do the right thing in weird cases.
When an application attempts to authenticate the user and this user is already logged in at the console, pam_console.so checks whether
there is a file in /etc/security/console.apps/ directory with the same name as the application servicename, and if such a file exists,
authentication succeeds. This way pam_console may be utilized to run some system applications (reboots, config tools) without root pass-
word, or to enter user password on the first system login only.
ARGUMENTS
debug turns on debugging
allow_nonroot_tty
gain console locks and change permissions even if the TTY's owner is not root.
handlersfile=filename
tells pam_console.so to get the list of the handlers from a different file than /etc/security/console.handlers
EXAMPLE
/etc/pam.d/some-system-tool:
auth sufficient pam_rootok.so
auth required pam_console.so
/etc/pam.d/some-login-service:
auth sufficient pam_console.so
auth required pam_unix.so
session required pam_unix.so
session optional pam_console.so
FILES
/var/run/console/
/var/run/console/console.lock
/etc/security/console.apps
/etc/security/console.handlers
SECURITY NOTES
When pam_console "auth" is used for login services which provide possibility of remote login, it is necessary to make sure the application
correctly sets PAM_RHOST variable, or to deny remote logins completely. Currently, /bin/login (invoked from telnetd) and gdm is OK, others
may be not.
SEE ALSO
console.perms(5)
console.apps(5)
console.handlers(5)
pam_console_apply(8)
/usr/share/doc/pam*/html/index.html
BUGS
Let's hope not, but if you find any, please report them via the "Bug Track" link at http://bugzilla.redhat.com/bugzilla/
AUTHORS
Michael K. Johnson <johnsonm@redhat.com>
Support of console.handlers and other improvements by Tomas Mraz <tmraz@redhat.com>
Red Hat 2005/10/4 pam_console(8)