11-26-2010
how to delete files at booting of system (system startup)
hi all
I have a problem how to write a shell script which delete files/folder form directory whenever system boot and copy last updated folder/file in the specified directory.pse help me ASAP.
i write a script which copy files in directory.I want when system boot up using script it check whether these files are modified.If files are modified then delete this file and copy new file in this location.My problem is how to delete these files when every time system is boot up and copied new file.
there are some files and directories in this location
FILES=/home/new.config
DIR=root/mcms/config
Last edited by shubhig15; 11-26-2010 at 05:35 AM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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
2. UNIX for Dummies Questions & Answers
Hi All,
My OS is redhat 7.1. How can I start my own service (e.g. simple scripts) when the system is started?
I found something like /etc/rc.d, /etc/rc.init ...
But I have no idea on them, have anyone can help me?
regards
wilson (6 Replies)
Discussion started by: wilsonchan1000
6 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
Can anyone tell me how to find the System Startup time.
Currently I am using "who -b" to get last reboot time.
I wanted to know is there any log file for SCO Openserver 5, in which all this sort of imformations are kept.
I have tried searching the forum with words like "WHO... (6 Replies)
Discussion started by: shoeb_syed
6 Replies
4. Solaris
Booting the 32-bit OS ...
SunOS Release 5.7 Version Generic_106541-31
Copyright (c) 1983-2002, Sun Microsystems, Inc.
configuring network interfaces: le0.
Hostname: wz-ultra1
metainit: wz-ultra1: there are no existing databases
The system is coming up. Please wait.
checking ufs... (2 Replies)
Discussion started by: CollenM
2 Replies
5. SuSE
Hi Everybody
I am totally new to Linux.
We are using Suse Linux version 9.
Currently we have 4 to 5 shell scripts which needs to be executed manually by the users.I want these scripts to be run automatically when system starts...something like system startup service.
When system is... (1 Reply)
Discussion started by: appleforme1415
1 Replies
6. Shell Programming and Scripting
Hi all, new to the threads as well as Unix/Linux. I need to create a script that will delete any temporary files as well as check the files on the system for errors or corruption. This is what I have so far and I'm sure that I'm missing things or have the wrong commands. I'm not sure where to go... (3 Replies)
Discussion started by: Bwood1377
3 Replies
7. AIX
the error is
0518
/usr mnt failed,
pleaze tell me how i can fix it ! (1 Reply)
Discussion started by: majd_ece
1 Replies
8. Solaris
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
9. Red Hat
Hello,
I had a linux server running mysql db without any issues, it just panic'd and now its not coming up , unfortunately we do not have backup for this server as well can anybody help on this. Following is the error
Memory for crash kernel (0x0 to 0x0 ) notwithin permissible range
Red... (2 Replies)
Discussion started by: fugitive
2 Replies
10. Shell Programming and Scripting
I copied the script from an AskUbuntu post -
#!/bin/bash
### BEGIN INIT INFO
# Provides: tomcat7
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start/Stop Tomcat server
### END INIT INFO
... (14 Replies)
Discussion started by: Hijanoqu
14 Replies
rmf(1) General Commands Manual rmf(1)
NAME
rmf - remove folder (only available within the message handling system, mh)
SYNOPSIS
rmf [+folder] [-help] [-[no]interactive]
OPTIONS
Prints a list of the valid options to this command. Asks for confirmation before deleting a folder. By default, rmf deletes a folder and
its messages without asking for confirmation. If you specify the -interactive option, rmf asks if you are sure before deleting the folder.
You are advised to use this option, since when rmf deletes a folder its contents are lost irretrievably.
DESCRIPTION
The rmf command removes all of the messages within the current folder, and then removes the folder itself. If there are any files within
the folder which are not part of MH, they are not removed, and an error message is displayed.
You can specify a folder other than the current folder by using the +folder argument. If you do not specify a folder, and rmf cannot find
the current folder,rmf asks you whether you want to delete +inbox instead.
If the current folder is removed, it makes +inbox current.
Note that the rmf command irreversibly deletes messages that do not have other links, so use it with caution.
If the folder being removed is a sub-folder, the parent folder becomes the new current folder, and rmf tells you that this has happened.
This provides an easy mechanism for selecting a set of messages, operating on the list, then removing the list and returning to the current
folder from which the list was extracted.
Using rmf to delete a read-only folder deletes the private sequence and current message information from the file, without affecting the
folder itself. If you have sub-folders within a folder, you must delete all the sub-folders before you can delete the folder itself.
PROFILE COMPONENTS
Path: To determine the user's Mail directory
EXAMPLES
This example shows how rmf asks for confirmation when the -interactive option is used: % rmf -interactive +test Remove folder "test"? y
FILES
The user profile.
SEE ALSO
rmm(1)
rmf(1)