Something very weird has been happening when I'm creating files and directories. When I create a directory, at times depending on the directory name and depth, it becomes hidden and can only be seen typing "ls -a". When I say the name of the directory matters, "my_c++" will be hidden but using... (10 Replies)
Hi,
Consider a flat file abc.conf contains some rows. Each row contains the directory name with full path. now I want to find a particular file in every directory which are mentioned in the abc.conf file. How it can be done through unix shell script. (2 Replies)
Hi,
If I have a directory full of say 100 random files, and I would like to organize them, for example: FILE001, FILE002, FILE003, FILE004, etc.
How would I do this from Terminal, instead of manually changing each file? I'm using Mac OS X, if that makes a difference.
Thank you in advance... (8 Replies)
Hi ,
I have a list of files in the directory I want to sort based on the file name.
But in the middle of filename contains the number based on that I need to sort.Could you suggest me on the same?
Example filenames:
/user1$ls
RS.DEV.ISV.F1.RS.REFDATA.DATA... (1 Reply)
Sun Solaris Unix Question
Haven't been able to find any solution for this situation. Let's just say the file names listed below exist in a directory. I want the find command to find all files in this directory but at the same time I want to eliminate certain file names or files with certain... (2 Replies)
Hi All,
Can any one help me to list out the directory names which contain the specified file.
See for example
File name : file.201307014.LKT
Have the directory structure as below.
/app/work/data/INDIA/file.201307014.LKT
/app/work/data/AMERICA/file.201307014.KTP... (5 Replies)
Dears,
Would you please help on following bash script:
I want to get the most recent file named alfaYYYYMMDD.gz in one directory:
for example:
in directory /tmp/
ls -ltr
alfa20130715.gz
holding.gz
alfa20130705.gz
sart.txt
merge.txt.gz
alfa20130802.gz
my result shoud be... (1 Reply)
Hi, I have about 60 files in a directory and need to rename those files. For example the file names are
i_can_phone_yymmdd.txt (where yymmdd is the date. i.e 170420 etc)
i_usa_phone_1_yymmdd.txt
i_eng_phone_4_yymmdd.txt
The new file names should be
phone.txt
phone_1.txt
phone_4.txt
I am... (4 Replies)
Discussion started by: naveed
4 Replies
LEARN ABOUT SUNOS
lckpwdf
lckpwdf(3C) Standard C Library Functions lckpwdf(3C)NAME
lckpwdf, ulckpwdf - manipulate shadow password database lock file
SYNOPSIS
#include <shadow.h>
int lckpwdf(void);
int ulckpwdf(void);
DESCRIPTION
The lckpwdf() and ulckpwdf() functions enable modification access to the password databases through the lock file. A process first uses
lckpwdf() to lock the lock file, thereby gaining exclusive rights to modify the /etc/passwd or /etc/shadow password database. See
passwd(4) and shadow(4). Upon completing modifications, a process should release the lock on the lock file using ulckpwdf(). This mechanism
prevents simultaneous modification of the password databases. The lock file, /etc/.pwd.lock, is used to coordinate modification access to
the password databases /etc/passwd and /etc/shadow.
RETURN VALUES
If lckpwdf() is successful in locking the file within 15 seconds, it returns 0. If unsuccessful (for example, /etc/.pwd.lock is already
locked), it returns -1.
If ulckpwdf() is successful in unlocking the file /etc/.pwd.lock, it returns 0. If unsuccessful (for example, /etc/.pwd.lock is already
unlocked), it returns -1.
USAGE
These routines are for internal use only; compatibility is not guaranteed.
FILES
/etc/passwd password database
/etc/shadow shadow password database
/etc/.pwd.lock lock file
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO getpwnam(3C), getspnam(3C), passwd(4), shadow(4), attributes(5)SunOS 5.10 29 Dec 1996 lckpwdf(3C)