Sponsored Content
Top Forums UNIX for Dummies Questions & Answers hey guys i need our help for my assignment to be passed tomorrow. Post 302516869 by skypigeon on Monday 25th of April 2011 11:51:51 AM
Old 04-25-2011
hey guys i need our help for my assignment to be passed tomorrow.

good day to all. im just a new member. since im a newbie in UNIX, im having trouble learning.




problem #1
Quote:
MONITORING A USER'S LOGIN TIME
DUE DATE=APRIL 26, 2011


Create a script called USERLOGTIME that computes for the total
number of hours and minutes a particular user has been logged on to the
system. The script accepts one parameter, the user id.

Sample run:
[prompt]$ LOGTIME it2015678 <enter>

User it2015678 is CRUZ Tommy H
And has logged on to the system for:
8 hours
12 minutes
from the time this script was run.





problem # 2
Quote:
RECYCLE BIN
DUE DATE=APRIL 27, 2011

Write a script called RECYCLEBIN that will follow the given
syntax:
RECYCLEBIN [-l -p ] filename/s

The specific action of each parameter in the script is
as follows:

filename/s moves the filename/s into a hidden directory called
".recyclebin" in your home directory
-l it will list the current contents of the recycle bin
or it will list the specified filename/s
-p it will purge(clean) all the contents of the recycle bin
or it will remove the specified filename/s

The script will act like a recycle bin in that instead of removing
files permanently, it moves them into a hidden folder called,".recyclebin"
in your home directory. If ".recyclebin" doesn't exist, it should be
automatically created.

Sample Runs:
a. [prompt]$ RECYCLEBIN hello.txt <enter>

Do you want the file/s to be moved to recycle bin y/n? y <enter>

[prompt]$

b. to verify if hello.txt was moved to " .recyclebin "
[prompt]$ RECYCLEBIN -l <enter>

OUTPUT: -rw-r--r-- 1 it2003456 stud .... hello.txt

[prompt]$

c. to purge
[prompt]$ RECYCLEBIN -p

Do you want all files in the recycle bin to be deleted y/n? y <enter>

[prompt]$

MACHINE PROBLEM 5
FAMILIARIZATION WITH PROCESSES
DUE DATE=APRIL 28, 2011


Create a menu-driven script called PROCESSES that will perform each of
the given requirement upon choice of a letter by a user:

[A/a]. Display all user processes and their total
[B/b]. Display all your account's processes and its total
[C/c]. Display a process or set of processes given a user id
or the a user's real world name
[D/d]. Halts a particular process given its pid
[E/e]. Exit


thank you guys. take good care!
 

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Have an interview tomorrow just wondering one thing...

Hi, just a quick question here. I have an interview coming up tomorrow. The job is for a UNIX System Admin. I have a degree in Computer Networking and am familiar with Solaris, but was wondering what should I brush up on before going in to this interview (like any online reference)? Thank you... (2 Replies)
Discussion started by: NELS
2 Replies

2. UNIX for Dummies Questions & Answers

Date change to tomorrow

I have this code in a script that says it is calculating current date: cur_date=`date -u +%m/%d/%Y` If the script is run today during the day, it returns 12/11/2008 If the script is run today during the night, it returns 12/12/2008 Why does it return tomorrow's date if it was run at... (2 Replies)
Discussion started by: mkoay
2 Replies

3. Shell Programming and Scripting

grep tomorrow's date

Hi guys, I need to find tomorrows date in date fomat and should be in variable. as I need to grep this date in a flat file ie. if today's date is '09 JAN 2009' output should be '10 JAN 2009' unix/perl script will be fine. (21 Replies)
Discussion started by: ssachins
21 Replies

4. Cybersecurity

Hey guys

Hey guys, new geek here, sorry I didnt see a intro section. But I do have a question and hope to make my stay here perma. I am interested in IT security, ands I really want to learn, I was hoping for whatever questions I had you guys could lead me through the narrowest path with a broad selection... (1 Reply)
Discussion started by: abeja
1 Replies

5. Homework & Coursework Questions

hey guys i need our help to be passed tomorrow.

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: log in time and about the recyclebin 2. Relevant commands, code, scripts, algorithms: im not sure what to... (2 Replies)
Discussion started by: skypigeon
2 Replies

6. UNIX for Dummies Questions & Answers

Rebuilding computer tomorrow at work

I'm rebuilding my primary computer at work tomorrow. Currently, it has Windows 7. I would like to replace the main system with either Linux or Unix, although I would like to be able to run a fully operational Windows as a VM within that. Any recommendations on which Linux or Unix to go with? I'm... (6 Replies)
Discussion started by: Sean_
6 Replies
VFS_RECYCLE(8)						    System Administration tools 					    VFS_RECYCLE(8)

NAME
vfs_recycle - Samba VFS recycle bin SYNOPSIS
vfs objects = recycle DESCRIPTION
This VFS module is part of the samba(7) suite. The vfs_recycle intercepts file deletion requests and moves the affected files to a temporary repository rather than deleting them immediately. This gives the same effect as the Recycle Bin on Windows computers. The Recycle Bin will not appear in Windows Explorer views of the network file system (share) nor on any mapped drive. Instead, a directory called .recycle will be automatically created when the first file is deleted and recycle:repository is not configured. If recycle:repository is configured, the name of the created directory depends on recycle:repository. Users can recover files from the recycle bin. If the recycle:keeptree option has been specified, deleted files will be found in a path identical with that from which the file was deleted. This module is stackable. OPTIONS
recycle:repository = PATH Path of the directory where deleted files should be moved. If this option is not set, the default path .recycle is used. recycle:directory_mode = MODE Set MODE to the octal mode the recycle repository should be created with. The recycle repository will be created when first file is deleted. If recycle:subdir_mode is not set, MODE also applies to subdirectories. If this option is not set, the default mode 0700 is used. recycle:subdir_mode = MODE Set MODE to the octal mode with which sub directories of the recycle repository should be created. If this option is not set, subdirectories will be created with the mode from recycle:directory_mode. recycle:keeptree = BOOL Specifies whether the directory structure should be preserved or whether the files in a directory that is being deleted should be kept separately in the repository. recycle:versions = BOOL If this option is True, two files with the same name that are deleted will both be kept in the repository. Newer deleted versions of a file will be called "Copy #x of filename". recycle:touch = BOOL Specifies whether a file's access date should be updated when the file is moved to the repository. recycle:touch_mtime = BOOL Specifies whether a file's last modified date should be updated when the file is moved to the repository. recycle:minsize = BYTES Files that are smaller than the number of bytes specified by this parameter will not be put into the repository. recycle:maxsize = BYTES Files that are larger than the number of bytes specified by this parameter will not be put into the repository. recycle:exclude = LIST List of files that should not be put into the repository when deleted, but deleted in the normal way. Wildcards such as * and ? are supported. recycle:exclude_dir = LIST List of directories whose files should not be put into the repository when deleted, but deleted in the normal way. Wildcards such as * and ? are supported. recycle:noversions = LIST Specifies a list of paths (wildcards such as * and ? are supported) for which no versioning should be used. Only useful when recycle:versions is enabled. EXAMPLES
Move files "deleted" on share to /data/share/.recycle instead of deleting them: [share] path = /data/share vfs objects = recycle recycle:repository = .recycle recycle:keeptree = yes recycle:versions = yes VERSION
This man page is correct for version 3.0.25 of the Samba suite. AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed. Samba 4.0 06/17/2014 VFS_RECYCLE(8)
All times are GMT -4. The time now is 07:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy