System maintenance weekly job and welcome message


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers System maintenance weekly job and welcome message
# 1  
Old 12-26-2011
System maintenance weekly job and welcome message

Since a few weeks I am playing with debian and now I have 2 questions.

The first one:

I want to create weekly a file to all user directories.
I know that you have a cronjob to schedule it weekly. In this cronjob I have written the following line:

df >> /home/%users/diskspace.txt

I've tried this first in the shell, but it won't put the outcome to all other home directories. How can I realize that this file is created in each home directory?


Second question is, how can I give all users of member group such as "family" a nice welcome message?

I've tried google for both but it doesn't make sense for me. Smilie


Thanks.
Icy
# 2  
Old 12-26-2011
For first question ..
Code:
$ for user in $(cut -d: -f1 < /etc/passwd); do df > /home/$user/diskspace.txt ; done

But you must be a root or a superior user to all these users to create file in their homepath ..

For second question, use wall command to broadcast your message to all users in particular group with -g option.
This User Gave Thanks to jayan_jay For This Post:
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Solaris 10 system boots into Maintenance mode

I have seen similar threads on this issue, but I have not seen a fix. Basically I am getting a lot of rcp bind errors. Below find the output of "svcs -xv". not sure where to begin: # svcs -xv svc:/network/rpc/bind:default (RPC bindings) State: maintenance since Fri May 25 14:13:18 2012... (14 Replies)
Discussion started by: brownwrap
14 Replies

2. Solaris

System booting to maintenance mode

Hi Guys, I have a sunblade 1500. I booted the system and it booted to maintenance mode. How can I fix this? Thanks lots (8 Replies)
Discussion started by: cjashu
8 Replies

3. Solaris

root password for system maintenance (control-d to bypass)

I have message "root password for system maintenance (control-d to bypass)" after Solaris 10 boots up. Why it appears ? thx for help. (3 Replies)
Discussion started by: presul
3 Replies

4. Linux

System message

how can i send a system wide shutdown message from a default Mint user account in Linux? (1 Reply)
Discussion started by: roozis
1 Replies

5. Shell Programming and Scripting

Nightly job error message when trying to execute script

Hello All, I am getting the following error message when trying to execute the following script. AWK=/usr/bin/awk TR=/usr/bin/tr SED=/usr/bin/sed CAT=/usr/bin/cat MAILFILE=/home//nightly_jobs.tmp mailto=xxx@gmail.com Nigh_Status = `db2 "select TYPE from ETL.LOCK where STATUS <> 0 and... (12 Replies)
Discussion started by: NARESH1302
12 Replies

6. Solaris

svc:/system/filesystem/local is always in maintenance status

Hello Friends, I need to change network filesystem status as online but it always seems in maintenance mode, I appreciate your any suggestion to change its state as online. shell>svcadm enable svc:/system/filesystem/local shell>svcs -l svc:/system/filesystem/local fmri ... (4 Replies)
Discussion started by: EAGL€
4 Replies

7. Solaris

Sun Solaris version 10: cron job does not send the default message.

Hi all, Our servers were on Sun Solaris 8.1, anytime a cron job executed the user ran that job received a email of job's output. I think that the default and Administrator did not setup anything. However, when we upgraded the OS to Sun Solaris ver.10, the cron job is no longer send a email... (2 Replies)
Discussion started by: cmnguyen
2 Replies

8. UNIX for Advanced & Expert Users

System Maintenance

How do I go about doing this??? Is there something to it other than cleaning up useless files?? if you have knowledge concerning this, please give your suggestions also, is it possible or safe to compress an entire filesystem. how do you go about doing this??? any information is appreciated (7 Replies)
Discussion started by: IMPORTANT
7 Replies

9. UNIX for Dummies Questions & Answers

What are core files and how can I delete them when am performing system maintenance??

Help me How can I go about doing this. also, if you have any idea of other files I can delete and what I can do to improve the performance of a system thats running too slow (6 Replies)
Discussion started by: IMPORTANT
6 Replies

10. UNIX for Dummies Questions & Answers

Quiet System for Maintenance

I have backups that run in a cron @ midnight. Does the backup utility make sure that the system is quiet --(no users are logged on) or do I need to add some stuff to make sure nobody is accessing those file while they are being backed up. (3 Replies)
Discussion started by: michieka
3 Replies
Login or Register to Ask a Question