07-20-2007
Where do I need to add this code?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am trying to use the find command to find files in the current directory that meet a certain date criteria.
find . -type -f -mtime +2
However, the above also checks the directories below.
I tried -prune, but that seems to ignore this directory completely.
I read about using -path w/... (5 Replies)
Discussion started by: jliebling
5 Replies
2. Shell Programming and Scripting
I would like my csh prompt to behave like the linux csh prompt setting done by linux command (set prompt="%n@%m %c]$ ")
how do I do that?
What I'm trying to do is that I would like to see what directory I'm in by looking at the prompt.
I've figured out that %n is like $user, and %m is like... (3 Replies)
Discussion started by: jamesloh
3 Replies
3. Shell Programming and Scripting
Can someone tell me how do i set my current working directory in my prompt?
Note: I dont want to use env variable PWD and using `pwd` gives me only my home directoy. suggest a different way ?
I use /bin/sh
thanks!! (3 Replies)
Discussion started by: yesmani
3 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I want that the prompt that is being displayed (i.e $ sign) should display always the current directory I am working in instead of that $ sign
example:
as we use PS1=patric and the prompt changes from $ to patric OR
if we write the command PS1=`pwd` it will display the current... (5 Replies)
Discussion started by: premjotsingh
5 Replies
5. AIX
When I use "/" to look for a particular command that I typed in the current session it says
D02:-/home/user1/temp> /job
ksh: /job: not found.
D02:-/home/user1/temp>
previously it used to fetch all the commands which had job in it..
for example subjob, endjob, joblist etc...
may I... (7 Replies)
Discussion started by: meetzap
7 Replies
6. UNIX for Dummies Questions & Answers
Hi All,
This is an embarrassingly simple question and couldn't think of "keywords" to search for the answer, but how do I change my UNIX/KSH prompt to show the machine name and my "current" but not "full" directory?
For example: if the machine name is "machine" and I'm currently in... (4 Replies)
Discussion started by: chatguy
4 Replies
7. UNIX for Dummies Questions & Answers
i have this find command on my script as:
for i in `find $vdir -name "$vfile" -mtime +$pday`
the problem with this code is that the sub-directories are included on the search. how do i restrict the search to confine only on the current directory and ignore the sub-directories. please advise.... (7 Replies)
Discussion started by: wtolentino
7 Replies
8. UNIX for Dummies Questions & Answers
Dear all,
I am facing a issue in MV command, this move is done by our c program. We are moving the file to same directory so basically I think it will be a rename of the inode. So we might not useany extra space then why the move is failing. Does it require space to move the same size of file... (5 Replies)
Discussion started by: arunkumar_mca
5 Replies
9. Shell Programming and Scripting
My code to "Delete empty files from a directory entered in command promt"
#/bin/sh
echo "Enter directory"
read gh
for file in `ls $gh`
do
# to get the size of file
a=$( ls -l file | awk ' {print $7} ');
echo $a
if
then
echo "removing file "
rm file
fi
done (6 Replies)
Discussion started by: adirajup
6 Replies
10. Linux
Hi,
I am trying to run this command to connect to each server without being prompted for the password. How can I do this in Linux redhat 7.2:
for HOST in $VIPS; do
su - Myadminid -c "ssh -o ConnectTimeout=10 $HOST 'date; hostname; pkill -9 -f -u Myadminid xx00 ; ps -ef |grep Myadminid'" ... (7 Replies)
Discussion started by: mrn6430
7 Replies
LEARN ABOUT OPENSOLARIS
ldap_add_ext_s
ldap_add(3LDAP) LDAP Library Functions ldap_add(3LDAP)
NAME
ldap_add, ldap_add_s, ldap_add_ext, ldap_add_ext_s - perform an LDAP add operation
SYNOPSIS
cc[ flag... ] file... -lldap[ library... ]
#include <lber.h>
#include <ldap.h>
intldap_add(LDAP *ld, char *dn, LDAPMod *attrs[]);
intldap_add_s(LDAP *ld, char *dn, LDAPMod *attrs[]);
int ldap_add_ext(LDAP *ld, char *dn, LDAPMod **attrs,
LDAPControl **serverctrls, int * msgidp);
int ldap_add_ext_s(LDAP *ld, char *dn, LDAPMod **attrs,
LDAPControl **serverctrls, LDAPControl **clientctrls);
DESCRIPTION
The ldap_add_s() function is used to perform an LDAP add operation. It takes dn, the DN of the entry to add, and attrs, a null-terminated
array of the entry's attributes. The LDAPMod structure is used to represent attributes, with the mod_type and mod_values fields being used
as described under ldap_modify(3LDAP), and the ldap_op field being used only if you need to specify the LDAP_MOD_BVALUES option. Other-
wise, it should be set to zero.
Note that all entries except that specified by the last component in the given DN must already exist. ldap_add_s() returns an LDAP error
code indicating success or failure of the operation. See ldap_error(3LDAP) for more details.
The ldap_add() function works just like ldap_add_s(), but it is asynchronous. It returns the message id of the request it initiated. The
result of this operation can be obtained by calling ldap_result(3LDAP).
The ldap_add_ext() function initiates an asynchronous add operation and returns LDAP_SUCCESS if the request was successfully sent to the
server, or else it returns a LDAP error code if not (see ldap_error(3LDAP)). If successful, ldap_add_ext() places the message id of
*msgidp. A subsequent call to ldap_result(), can be used to obtain the result of the add request.
The ldap_add_ext_s() function initiates a synchronous add operation and returns the result of the operation itself.
ERRORS
ldap_add() returns -1 in case of error initiating the request, and will set the ld_errno field in the ld parameter to indicate the error.
ldap_add_s() will return an LDAP error code directly.
ATTRIBUTES
See attributes(5) for a description of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|Availability |SUNWcsl (32-bit) |
| |SUNWcslx (64-bit) |
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
SEE ALSO
ldap(3LDAP), ldap_error(3LDAP), ldap_modify(3LDAP), attributes(5)
SunOS 5.11 27 Jan 2002 ldap_add(3LDAP)