How to create a shell script to remove the files on solaris server at 00000hrs?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to create a shell script to remove the files on solaris server at 00000hrs?
# 1  
Old 04-19-2012
How to create a shell script to remove the files on solaris server at 00000hrs?

Hi folks,

As per mentioned in the title, how to create a shell script to delete those files from the server at 00000hrs every day?



Thanks in advance Smilie

Last edited by DukeNuke2; 04-19-2012 at 05:43 AM..
# 2  
Old 04-19-2012
just write a small script to delete the files and after that, configure cron to start the script on the time you want it to...
# 3  
Old 04-19-2012
Thanks DukeNuke2 for your reply Smilie

I got it, and just tested the script, and it works!!!

---------- Post updated at 06:16 PM ---------- Previous update was at 05:22 PM ----------

Hi folks,

In what circumstance does the log move to
/var/adm/messages.0.......messages.1,messages.2,messages.3 .......etc?

Last edited by DukeNuke2; 04-19-2012 at 06:28 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to have local shell variables in a ksh script seen on remove server in SSH block?

I have googled this and found many solutions, but none of them are working for me. I am in a korn shell, most others reference bsh, maybe that is the issue? Anyway, all I am trying to do is use a variable I have declared in my main script in a remote shell I am running through ssh. So I have a... (8 Replies)
Discussion started by: DJR
8 Replies

2. Shell Programming and Scripting

How to create or convert to pdf files from csv files using shell script?

Hi, Can anyone help me how to convert a .csv file to a .pdf file using shell script Thanks (2 Replies)
Discussion started by: ssk250
2 Replies

3. Shell Programming and Scripting

Shell Script to filter users and create them again from a back-up server

This is a script to filter the users out of etc/passwd and etc/group. So if you want to migrate of restore a server you can use this script from a backup to restore and make the same users on you had.. Please feedback and comments. #!/bin/bash prompt_list () { # haal uit de argumenten de... (5 Replies)
Discussion started by: dannyvdberg
5 Replies

4. Shell Programming and Scripting

script to create files on solaris 10

Hello, To learn ZFS, i try to create pool . and for that i want create 10 files with 512MB (because i dont have multiple disks and multiple controllers) ADMIT THAT THIS IS TEN HIGH-PERFORMANCE HARD DRIVES To get this 10 files,all of them have the same size : 512MB, I do these... (0 Replies)
Discussion started by: herbich1985
0 Replies

5. Shell Programming and Scripting

Shell script to remove empty files

Hi All, Can anyone please write a shell script to remove the empty files using an if condition. please help me out , urgent thanks (6 Replies)
Discussion started by: muthi_murali
6 Replies

6. Shell Programming and Scripting

Shell script to remove files

I am working in directory week5 and I want to delete the files in directory week1, without leaving directory week5. I understand that rm is used to delete a file, but how do you remove them while working in a different directory. I also only want to delete a certain set of files *. (1 Reply)
Discussion started by: smiley76112
1 Replies

7. Shell Programming and Scripting

how to create the files dynamically in c shell script

how can i CREATE a txt file dynamically in c shell: for instance: #! /bin/csh for each i (*) cat>file$i.txt for each j do .... (1 Reply)
Discussion started by: jdsignature88
1 Replies

8. UNIX for Dummies Questions & Answers

Create a shell script for write files with 2 parameters

Hello, I'm a newbie in shell script. So, i would like to create a shell script which take 2 IN parameters (PARAM1 and PARAM2). This script need to create 2 files as : I need to create this file /etc/apache2/sites-available/PARAM2 : <VirtualHost *:80> DocumentRoot "/home/PARAM1/www"... (0 Replies)
Discussion started by: chatlumo
0 Replies

9. Shell Programming and Scripting

Shell Script Create List of Deleted Files

Hi, I want to put all the deleted files in a txt file. Because i want to backup my image server which has thousands of jpg images. I wrote a shell script which will copies images from image server to backup image server. I setup a cronjob which runs on every five minutes. & through timestamp it... (8 Replies)
Discussion started by: mirfan
8 Replies

10. Shell Programming and Scripting

How To create Flat Files using Unix Shell Script?

Hi all, How to create Flat Files using Unix Shell Script. The Script is supposed to be sheduled to run at a particular time? Thanks in advance Appu (4 Replies)
Discussion started by: Aparna_k82
4 Replies
Login or Register to Ask a Question