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
MACSAVE(1)						      General Commands Manual							MACSAVE(1)

NAME
macsave - Save Mac files read from standard input SYNOPSIS
macsave [ - options ] DESCRIPTION
macsave reads a sequence of Macintosh MacBinary files from standard input and writes the files it contains subject to the options speci- fied. OPTIONS
In the absence of any options, macsave reads standard input and silently writes the file(s) it contains in MacBinary format, giving the output files ".bin" extensions and placing them in the current working directory. Subdirectories are created for embedded folders. -3 Write files in fork format (.info, .data and .rsrc files.) -f As -3, but empty data and rsrc files are not created. -r Write resource forks only (.rsrc files.) -d Write data forks only (.data files.) -u As -d, but the codes for CR and LF are interchanged, the filename extension is .text. -U As -u, but there is no filename extension. -a Write files in AppleShare format. This option is only valid if the program is compiled with support for some form of AppleShare. The current directory must be a valid AppleShare folder. -s Write extracted files to standard output in MacBinary format. -l List every file extracted (and every directory/folder created etc.) -i Do not extract, give information only (implies -l.) -q Ask the user for every file/folder whether it should be extracted (implies -l.) -V Gives the patchlevel of the program, and other information. Other options are ignored and the program quits immediately. -H Give short information about the options. Other options are ignored and the program quits immediately. BUGS
As this is a beta release, there may still be some problems. SEE ALSO
macutil(1) AUTHOR
Dik T. Winter, CWI, Amsterdam, The Netherlands (dik@cwi.nl) 3rd Berkeley Distribution October 22, 1992 MACSAVE(1)
All times are GMT -4. The time now is 03:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy