Hi,
I need to prompt for a response from a user to enter a path
read dest_dir?"Please Enter Directory :"
How do I do this until a valid directory is entered by the user. I can use
to check the existence of the directory. However when I try the following I cannot get it to work.
while ... (2 Replies)
I'm trying to write a script that identifies whether a directory of the form AWL.????????.IP exists. I have one that exists which is AWL.05301032.IP.
When I test like this: If ]
I get true, but when I test like this:
If ]
Or like this
If ]
Or any other variation of wild cards, I... (4 Replies)
Hi.
I what to write a make file that inside a target I want to check if a directory exists.
some like:
### make
a:
if ;then
<command 1>
else
<command 2>
fi
### make end
Thanks a lot
---------------------- (2 Replies)
Hello:
Can someone please help me figure out what is wrong here, my script does not move on to the "else" part even though there is no .ssh directory on my remote server:
$more putkey.sh
#!/bin/ksh
for server in `cat list`
do
if ; then
cat $HOME/.ssh/id_rsa.pub |ssh $server ' cat >>... (4 Replies)
Hey guys im trying to check if the directory exists
i get a syntax error on the elif statement iv tried using else and still same result im not sure. If the directory does not exist can i just insert mkdir /tmp/old under the elif once that part gets working
if ; then
#do nothing
elif
echo... (20 Replies)
cp $PATHLOGS/$DATE/*.* $TMP/logs_tmp/
cp $PATHLOGS/$DATE1/*.* $TMP/logs_tmp/
Before copying the files I have to check if the directory $DATE1 and $DATE2 exists.
If directory exists then, check if the folder contains some files.
if the file exists then, check if the file size is greater... (3 Replies)
I want to perform SQL *Loader operation only if a file named "load.txt" exists in a directory "/home/loc/etc". Please help how to check this with a if condition. (8 Replies)
Hi,
I am using solaris 10 OS and bash shell.just checking for small code snippet which follows below.
/export/home/vomappservers/spa/common/5.0
/export/home/vomappservers/spa/common/scripts
/export/home/vomappservers/spa/tools
/export/home/vomappservers/spa/scm5.0/SCCS... (5 Replies)
Hi Gurus,
I have a requests to find if all the file in the filelist exist in certain directory.
example:
my filelist
abc
def
ddd
cde
afg
how can I find these 5 files exists at director /home/abc
Thanks in advance (7 Replies)
Hi guys,
I am beginner trying to learn unix. So any help is welcomed.
My requirement is to check whether is a file exists in a particular directory or not.
The directory path and filename are taken dynamically with user interaction. So the program should continue only if the $filename... (1 Reply)
Discussion started by: maris_markur
1 Replies
LEARN ABOUT LINUX
datadm
datadm(1M)datadm(1M)NAME
datadm - maintain DAT static registry file
SYNOPSIS
/usr/bin/datadm [-v] [-u] [-a service_provider.conf] [-r service_provider.conf]
The datadm utility maintains the DAT static registry file, dat.conf(4).
This administrative configuration program allows uDAPL service providers to add and remove themselves to the dat.conf file.
You can add or remove interface adapters that a service provider supports from a system after its installation. You can use datadm to
update the dat.conf file to reflect the current state of the system. A new set of interface adapters for all the service providers cur-
rently installed is regenerated.
The following options are supported:
-a service_provider.conf
Enumerate each device entry in the service_provider.conf(4) file into a list of interface adapters, that is, interfaces to external
network that are available to uDAPL consumers.
-r service_provider.conf
Remove the list of interface adapters that corresponds to the device entry in the service_provider.conf(4) file.
-u
Update the dat.conf to reflect the current state of the system with an up to date set of interface adapters for the service providers
that are currently listed in the DAT static registry.
-v
Display the DAT static registry file, dat.conf.
Example 1: Enumerating a Device Entry
The following example enumerates a device entry in the service_provider.conf(4) file into interface adapters in the dat.conf(4) file.
Assume that SUNW has a service provider library that supports the device tavor. It has a service_provider.conf(4) file installed in the
directory /usr/share/dat/SUNWudaplt.conf with a single entry as follows:
driver_name=tavor u1.2 nonthreadsafe default udapl_tavor.so.1 SUNW.1.0 ""
tavor is an Infiniband Host Channel Adapter with two ports. Both IB ports exist in a single IB partition, 0x8001. If an IP interface is
plumbed to each port, there are two IPoIB device instances, ibd0 and ibd1:
# ls -l /dev/ibd*
/dev/ibd0 -> /devices/pci@1/pci15b3,5a44@0/ibport@1,8001,ipib:ibd0
/dev/ibd1 -> /devices/pci@1/pci15b3,5a44@0/ibport@2,8001,ipib:ibd1
Running the command, datadm -a /usr/share/dat/SUNWudaplt.conf appends two new entries (if they do not already exists]) in the
/etc/dat/dat.conffile:
ibd0 u1.2 nonthreadsafe default udapl_tavor.so.1 SUNW.1.0 ""
"driver_name=tavor"
ibd1 u1.2 nonthreadsafe default udapl_tavor.so.1 SUNW.1.0 ""
"driver_name=tavor"
Example 2: Updating the dat.conf to Reflect the Current State of the System
A new IB partition, 0x8002 is added to the above example covering port 1 of the Host Channel Adapter. If a new IP interface is plumbed to
port 1/partition 0x8002, there is a third IPoIB device instance: ibd2.
# ls -l /dev/ibd*
/dev/ibd0 -> /devices/pci@1/pci15b3,5a44@0/ibport@1,8001,ipib:ibd0
/dev/ibd1 -> /devices/pci@1/pci15b3,5a44@0/ibport@2,8001,ipib:ibd1
/dev/ibd2 -> /devices/pci@1/pci15b3,5a44@0/ibport@1,8002,ipib:ibd2
Running datadm -u command, updates the /etc/dat/dat.conf file with a new entry added reflecting the current state of the system.
datadm -v shows that there are now three entries in the /etc/dat/dat.conf file:
ibd0 u1.2 nonthreadsafe default udapl_tavor.so.1 SUNW.1.0 ""
"driver_name=tavor"
ibd1 u1.2 nonthreadsafe default udapl_tavor.so.1 SUNW.1.0 ""
"driver_name=tavor"
ibd2 u1.2 nonthreadsafe default udapl_tavor.so.1 SUNW.1.0 ""
"driver_name=tavor"
/etc/dat/dat.conf DAT static registry file
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWudaplu |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
pkgadd(1M), pkgrm(1M), libdat(3LIB), dat.conf(4), service_provider.conf(4). attributes(5)
18 Jun 2004 datadm(1M)