Sponsored Content
Homework and Emergencies Homework & Coursework Questions Hello.. can someone help my with this tasks? Post 302424736 by eclip on Wednesday 26th of May 2010 07:48:47 AM
Old 05-26-2010
Error Hello.. can someone help my with this tasks?

1. Write a shell program which renames the current directory with the given file extension to another extension. The playoffs are given on the command line.

Example usage:

$ Rename txt doc

will be renamed:

aaa.txt in aaa.doc
Juhutxt in Juhudoc
...

* To solve, you can also help with sed or awk commands.
*********************************************************

2. Write a shell program to check once every five minutes if the system appears a process and attempt to kill him. Name of the process we give the command line.

Example usage:

$ Kill firefox

computer will be checked every five minutes, if any process running called Firefox, and will try to kill him. Hint: Be sure to use the kill command.
*********************************************************

3. Write a shell program, which checks the file / etc / passwd and displays the number of processes for each user.

Example output: Processes

45 root
peter 2
Exercise 8

* Look at solving the structure of the file / etc / passwd
*********************************************************

4. Write a shell program, which scans all files in the specified directory and its poddirektorijih and displays the current file, (the date of last change).

Example output:

The latest $ / usr / etc
/ Usr / etc / httpd / httpd Oct 25 12:16
*********************************************************

5.Write a shell program that records the daily availability of computers. As the argument we give him a file containing a list of computers, the program should check every five minutes if they are available. In a file (log) to record, if any of the computers are not reachable, the name and the time was not available.

Example usage:

$ Check list_of_computers.txt

prints in the book:

io.something.si not reachable at 15:31
io.somethingsi not reachable at 15:36
io.something.si not available at the 15:41
verbena.something.si not reachable at 15:41
*********************************************************

6. In the shell, write a program that records the density of water users on the system. The program should keep records for every 30 seconds and not more than two days ago. Records should be stored in the files today and yesterday in the format:

Time: 11:50:10 User: 3
Time: 11:50:40 User: 5
*********************************************************

7. Write a shell program, which displays how many and how long (in total) were at some time users logged into the system. Time we give the two dates as a command-line argument.

Example output:

Announces $ 15/10 20/10
Exercise 5 1 day 12:34
demsared 1:12 11 5 days
blazlena 1 0 days, 0:01
...

* Command to look at the property address
*********************************************************

would be nice that someone could help me.. cuz i dont know how to make it... SmilieSmilie
 

10 More Discussions You Might Find Interesting

1. News, Links, Events and Announcements

System Administrators Tasks

Numbers of users unsure what is a System Administrators work, tasks and his routine. Here is a good link on a System Administrators Work Schedule also summary of tasks or work queue that the person handle (a full checklists). Also there is some details on every tasks. ... (0 Replies)
Discussion started by: killerserv
0 Replies

2. UNIX for Dummies Questions & Answers

Repetitive Tasks

Could someone tell me how I can simplify the script that follows!!! I know that there must be a way how to grep Average from sar01.................. sar02 ....................... sar03....................... sar04... (3 Replies)
Discussion started by: JairGuerra
3 Replies

3. UNIX for Dummies Questions & Answers

Need help with tasks!

Hi guys! I have a dummy question for u :p I cant find a solution for these tascks...tried everything (i know :cool: ). 1 Issue the following command sleep 1000 Note that sleep 1000 waits 1000 seconds!!! You cannot do anything now!!! 2 Open another terminal window and enter the tty... (1 Reply)
Discussion started by: RomeO
1 Replies

4. Shell Programming and Scripting

Script(s) to Automate Tasks

I know that this has a bad title, but I'm not sure how to sum it up well. (And I'm new to Linux in general, so please excuse any incorrect terminology :o) Anyway, I'm trying to create a script that gets whatever folder you're in, and then does a command with that directory as an argument. I... (2 Replies)
Discussion started by: droppedonjapan
2 Replies

5. AIX

Junior SA Tasks?

I've been given more responsibility at work and was basically told to take junior system admin responsibilities over our aix box. The catch is, I need to learn on my own. I know basics, but what are some task that I could perform on a daily basis for starters? We have a support group, but not so... (2 Replies)
Discussion started by: NycUnxer
2 Replies

6. Shell Programming and Scripting

schedule tasks

As far as I know Crontab is the utulity to schedule tasks to run at specific times.Is there any utility to perform the same task (4 Replies)
Discussion started by: tjay83
4 Replies

7. Solaris

Projects / Tasks / Zones

Hi there Created some zones on my m5000, both going to be used for oracle. Been reading up about how solaris 10 has made tuning of the /etc/system file redundant and the use of rctladm / projects have taken over. Been reading the manuals, but my head is about to explode. Thought I would... (2 Replies)
Discussion started by: sbk1972
2 Replies

8. Shell Programming and Scripting

Linking two tasks in a script

Hi, I have a question. I have a file that I need to do two things to. The first thing I need to do is turn a file with lines before and after a line with the term "Acceptance" into only the "Acceptance" line and every line thereafter. I am using this: grep -A1000000 "Acceptance" Brown_DL... (2 Replies)
Discussion started by: mikey11415
2 Replies

9. Shell Programming and Scripting

Doing multiple tasks in a loop.

I am in the process of updating a folder of hundreds of recipe html files. I've already managed to modify a number of things in each file but I have run into something that's beyond my ability. I have a text file that I need to insert the contents into the html at a specific point. It creates... (0 Replies)
Discussion started by: Trapper
0 Replies

10. Shell Programming and Scripting

crontab, automating tasks

I want to back up some of my system folders on a regular basis. Let's say some every day, but some other every week. I kinda know how to get backup like this form: tar cjf archive-$(date +%Y%m%d).tbz2 / -N ./archive-$(date -d yesterday +%Y%m%d) But, I DONT KNOW how to add this files to... (2 Replies)
Discussion started by: dr_mabuse
2 Replies
CHSH(1) 							   User Commands							   CHSH(1)

NAME
chsh - change login shell SYNOPSIS
chsh [options] [LOGIN] DESCRIPTION
The chsh command changes the user login shell. This determines the name of the user's initial login command. A normal user may only change the login shell for her own account; the superuser may change the login shell for any account. OPTIONS
The options which apply to the chsh command are: -h, --help Display help message and exit. -R, --root CHROOT_DIR Apply changes in the CHROOT_DIR directory and use the configuration files from the CHROOT_DIR directory. -s, --shell SHELL The name of the user's new login shell. Setting this field to blank causes the system to select the default login shell. If the -s option is not selected, chsh operates in an interactive fashion, prompting the user with the current login shell. Enter the new value to change the shell, or leave the line blank to use the current one. The current shell is displayed between a pair of [ ] marks. NOTE
The only restriction placed on the login shell is that the command name must be listed in /etc/shells, unless the invoker is the superuser, and then any value may be added. An account with a restricted login shell may not change her login shell. For this reason, placing /bin/rsh in /etc/shells is discouraged since accidentally changing to a restricted shell would prevent the user from ever changing her login shell back to its original value. FILES
/etc/passwd User account information. /etc/shells List of valid login shells. /etc/login.defs Shadow password suite configuration. SEE ALSO
chfn(1), login.defs(5), passwd(5). shadow-utils 4.5 01/25/2018 CHSH(1)
All times are GMT -4. The time now is 04:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy