12-14-2009
i am hoping to start a linux college course next year but wanted to have some experience before starting so got some past papers from a college student i know on some linux course questions (a few years old) and working through them. the edited question is a company wishes to to develop a new utility which will aid the users in backing up and restoring files in their own personal directory area. in doing this development, it should be recognised that script files are treated like any other i.e. they should be stored in a directory called scriptfiles.
only one utility is to be developed
the utility will give the user the option to back upor restore a set of files
the utility will give the user the ability to specify which type of file is to be used in particular back up or restore session.
the utility should be robust with respect to files and directories and the possible overwriting of files
i'm sorry for the size of the question but did not know what to leave out
thanks for any help
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
Test1.ksh
#! /bin/ksh
for i in $*
do
#echo "$i"
ksh test2.ksh $i &
done
test2.ksh
#! /bin/ksh
sleep 5s
echo "From Test 1 ==> $1"
exit 0;
I am executing as follows:
ksh test1.ksh a b c (10 Replies)
Discussion started by: risshanth
10 Replies
2. Solaris
Hi Everyone,
I would like to write a Back-up script for huge files and 3 day old file. I think i need to use Tar command for it. But I am not sure how this can be done. Can someone please assist me on this. (4 Replies)
Discussion started by: gehlnar
4 Replies
3. AIX
I have a user that runs a menu driven application, is there a way to see what scripts this application is executing in the back ground?
OS=AIX 4.3 (1 Reply)
Discussion started by: mangolinux
1 Replies
4. Shell Programming and Scripting
#!/bin/sh
##########################################################################################################
#This script is being used for AOK application for cleaning up the .out files and zip it under logs directory.
# IBM
# Created
#For pdocap201/pdoca202 .out files for AOK
#1.... (0 Replies)
Discussion started by: mridul10_crj
0 Replies
5. UNIX for Dummies Questions & Answers
Hello all, i'm stumped.... I need to list all directories with all there info and exclude the files, then vice versa. I am not sure if I need to string several ls commands together or how to even do that. I believe I need to do some variation of ls -l but need to figure out how to take out the... (5 Replies)
Discussion started by: citizencro
5 Replies
6. Shell Programming and Scripting
My script is as follows:
#!/bin/bash
STR1="test"
echo $STR1
STR2="/bldtmp/"$STR1
echo $STR2
STR3=$STR2'/tmp'
echo $STR3
output i am geting
----------------
test
/bldtmp/test
/tmptmp/test
but my need is:
------------------
test
/bldtmp/test (1 Reply)
Discussion started by: dchoudhury
1 Replies
7. Shell Programming and Scripting
lyang0@lyang0-OptiPlex-755:~$ ./test.sh
.
lyang0@lyang0-OptiPlex-755:~$ cat test.sh
#!/bin/bash
echo `dirname $0`
lyang0@lyang0-OptiPlex-755:~$ pwd
/home/lyang0
it doesn't get "/home/lyang0" and only when run /home/lyang0/test.sh it will get, but how can I do, then it can get the real... (8 Replies)
Discussion started by: yanglei_fage
8 Replies
8. Shell Programming and Scripting
Hi,
balajesuri and durden_tyler, I have found your perl script for the thread https://www.unix.com/shell-programming-scripting/176370-perl-script-help-me-extracting-string.html, but find it difficult to understand the syntax.
Could you or any forum members kindly shed some light on the logic... (3 Replies)
Discussion started by: royalibrahim
3 Replies
9. UNIX and Linux Applications
The problematic directory is the following:
/root/.cache/deja-dup
This directory grows until my "/" is full and then the restoring activity fails.
I already tried to create a symbolic link with origin another partition where I have more space. However during the restoring activity ... (4 Replies)
Discussion started by: puertas12
4 Replies
10. What is on Your Mind?
Retro Games has announced that the C64 is back, this time full-sized with a working keyboard for the dedicated retro home-computer fan, available December 2019.
See also:
CNN:
Iconic 80s computer The Commodore 64 to return with fully-functional keyboard
YouTube:
The C64 | Trailer
... (2 Replies)
Discussion started by: Neo
2 Replies
LEARN ABOUT OPENSOLARIS
snmpconf
SNMPCONF(1) Net-SNMP SNMPCONF(1)
NAME
snmpconf - creates and modifies SNMP configuration files
SYNOPSIS
snmpconf [OPTIONS] [fileToCreate]
Start with:
snmpconf -g basic_setup
Or even just:
snmpconf
DESCRIPTION
snmpconf is a simple Perl script that walks you through setting up a configuration file step by step. It should be fairly straight forward
to use. Merely run it and answer its questions.
In its default mode of operation, it prompts the user with menus showing sections of the various configuration files it knows about. When
the user selects a section, a sub-menu is shown listing of the descriptions of the tokens that can be created in that section. When a
description is selected, the user is prompted with questions that construct the configuration line in question.
Finally, when the user quits the program any configuration files that have been edited by the user are saved to the local directory, fully
commented.
A particularly useful option is the -g switch, which walks a user through a specific set of configuration questions. Run:
snmpconf -g basic_setup
for an example.
OPTIONS
-f Force overwriting existing files in the current directory without prompting the user if this is a desired thing to do.
-i When finished, install the files into the location where the global system commands expect to find them.
-p When finished, install the files into the users home directory's .snmp subdirectory (where the applications will also search for
configuration files).
-I DIRECTORY
When finished, install the files into the directory DIRECTORY.
-a Don't ask any questions. Simply read in the various known configuration files and write them back out again. This has the effect
of "auto-commenting" the configuration files for you. See the NEAT TRICKS section below.
-rall|none
Read in either all or none of the found configuration files. Normally snmpconf prompts you for which files you wish to read in.
Reading in these configuration files will merge these files with the results of the questions that it asks of you.
-R FILE,...
Read in a specific list of configuration files.
-g GROUPNAME
Groups of configuration entries can be created that can be used to walk a user through a series of questions to create an initial
configuration file. There are no menus to navigate, just a list of questions. Run:
snmpconf -g basic_setup
for a good example.
-G List all the known groups.
-c CONFIGDIR
snmpconf uses a directory of configuration information to learn about the files and questions that it should be asking. This
option tells snmpconf to use a different location for configuring itself.
-q Run slightly more quietly. Since this is an interactive program, I don't recommend this option since it only removes information
from the output that is designed to help you.
-d Turn on lots of debugging output.
-D Add even more debugging output in the form of Perl variable dumps.
NEAT TRICKS
snmpconf -g basic_setup
Have I mentioned this command enough yet? It's designed to walk someone through an initial setup for the snmpd(8) daemon. Really,
you should try it.
snmpconf -R /usr/local/snmp/snmpd.conf -a -f snmpd.conf
Automatically reads in an snmpd.conf file (for example) and adds comments to them describing what each token does. Try it. It's
cool.
NOTES
snmpconf is actually a very generic utility that could be easily configured to help construct just about any kind of configuration file.
Its default configuration set of files are SNMP based.
SEE ALSO
snmpd(8), snmp_config(5), snmp.conf(5), snmpd.conf(5)
4th Berkeley Distribution 08 Feb 2002 SNMPCONF(1)