I am writing a script that will identify the oldest file in a directory. Here's the syntax:
#!/bin/ksh
cd directory
chmod 777 *
ls -r -1t > file1
sed -n -e "1P" < file1 > file2
So my problem is, now I have file2, which contains the name of the oldest file in the directory. How do I use,... (1 Reply)
This script searches for core files and if it finds one, it emails me to let me know.I DONT want it to email me if it doesn't find one but I can't figure out what I need to change or add. Any thoughts? Script below:
/bin/find / -name core -type f -ls -exec file {} \;|/usr/bin/mailx -s... (1 Reply)
Hello
I am working on cleaning up permissions on Oracle mountpoints and datafiles in unix. I am looking for a script or a scripting idea to 1st.
1. grep for owner oracle
2. ensure its a directory owned for oracle
3. chmod 750 on the oracle owned directory.
4. grep for oracle files, etc... (3 Replies)
I'm new to shell scripting and am having a problem trying to do something in C shell. I want to write a script that will input something instead of a user doing it. For example, using the command 'write' the user is supposed to type something to be sent to another user. I want a script to be able... (3 Replies)
I am writing a backup script for AIX 5 and running into a problem where the output isn't being shown in the output log that is being created. Any ideas on how this would be corrected? I have included the script below. The only thing showing up in the file is listed below. I was hoping to capture... (2 Replies)
I'm writing a small script that will run an executable program (sort of like TOP). To exit the executable, you have to enter control C (^c). I'm trying to use a redirect input file to send the ^c but I'm not having any luck. My short script looks like this - /mydirectory/abc.script < abc.in >... (1 Reply)
Folks;
I'm writing a shell script to extract some fields out of a log file & it will run periodically, how can i make it runs starting from where it left of. for example;
if the script will do the extract every 2 days, let's say the first run will extract fields until July 25, 2007 @ 11:15:22... (1 Reply)
folks;
I have a script to remove any files that older than 14 days then move any files that younger than 7 days to another directory. but for some reason it doesn't move the files, when i do it manually it works but not through the script. i tried 2 different ways in writing the move part but it... (6 Replies)
Preview of command prompt
f ---> to start ferret
q----> to stop ferret
asp@nex:~$ f
NOAA/PMEL TMAP
FERRET v6.82
Linux 2.6.18-308.8.2.el5PAE 32-bit - 08/03/12
3-Dec-12 16:44
yes? go my.jnl
yes?column=4/skip=1/type=num,text ............filename.txt
---... (4 Replies)
Hi
I am trying to write a small script which takes one by one file name from a txt file and do a 'll' and need to check if equal to the given month, otherwise it should return back the file name.
Note: the file name contains parameter.
My code is given below: It is not working .. giving error... (6 Replies)
Discussion started by: Ravindra Swan
6 Replies
LEARN ABOUT OSF1
nis_intro
nis_intro(7) Miscellaneous Information Manual nis_intro(7)NAME
nis_intro - Network Information Service (NIS) introductory information
DESCRIPTION
The Network Information Service (NIS) is a distributed name service that allows participating hosts to share access to a common set of sys-
tem and network files. NIS allows the system administrator to manage these shared files on a single system.
NIS is intended for use in a secure environment only, where gateways do not allow outside Internet access to the NIS protocol.
NIS Maps
Information distributed by NIS is stored in database files called maps. Most of the NIS maps represent files that were traditionally
stored in the /etc directory. These files include the following: aliases group hosts netgroups networks passwd protocols rpc services
In a secure environment, you can run NIS in a secure mode, thereby creating secure and nonsecure versions of the NIS maps. See the Secu-
rity guide for more information.
You can also use NIS to distribute files used by Automount or AutoFS, or to distribute other user-defined files.
Each NIS map contains a set of keys and associated values. For example, as keys, the hosts map contains all host names on a network, and
as values, the corresponding Internet addresses. Each NIS map has a map name, used by programs to access data in the map.
NIS Domains
A named set of NIS maps is called a domain. A system's "domain name" or "NIS domain" corresponds to the set of NIS maps that the system
can access. You can think of an NIS domain as a set of systems that share the same set of NIS maps.
A system's domain name is set at the time the system is booted by the /sbin/init.d/nis script using an entry in the /etc/rc.config.common
file. System administrators can use the nissetup script to place entries in this file. The nissetup script is described in the Network
Administration manual.
You can determine your system's NIS domain using the domainname command. Refer to domainname(1). A domain name is required for retrieving
data from an NIS database.
NIS Client-Server Model
NIS follows the client-server model of distributed services. There are two types of NIS servers - master and slave. The master server
stores the master copy of the NIS maps for its domain; these are the only NIS maps that can be modified. Each domain has only one master
server.
Slave servers store copies of the master server's NIS maps. NIS slave servers can be spread throughout a network. Whenever an NIS map is
updated on the master server, the master propagates the changes to each slave server in its domain. If the master is unavailable for any
reason, the slave servers continue to make the NIS maps available to the NIS clients.
Clients are all of the systems that can access NIS maps. When a client requires NIS information, it makes a remote procedure call (RPC) to
one of the NIS servers to obtain the information.
NIS Data Storage
The data in NIS maps is stored as databases in dbm/ndbm, btree, or hash format.
For example, the NIS map for the /etc/hosts file in the domain market might be stored in these dbm/ndbm files: /var/yp/mar-
ket/hosts.byaddr.dir
/var/yp/market/hosts.byaddr.pag
/var/yp/market/hosts.byname.dir
/var/yp/market/hosts.byname.pag
The makedbm command takes an ASCII file such as /etc/hosts and converts it into dbm/ndbm files suitable for use by NIS. However, system
administrators use the Makefile script in the /var/yp directory to create NIS map files and specify file format. The Makefile script then
calls makedbm.
Refer to the Network Administration manual for details on the Makefile script, specifying different formats, and other NIS management
information.
RELATED INFORMATION
Commands: domainname(1), svcsetup(8), ypbind(8), yppasswdd(8), ypserv(8), ypxfr(8)
Files: svc.conf(4)
Network Administration delim off
nis_intro(7)