Sponsored Content
Top Forums Shell Programming and Scripting Delete the files by exact date Post 302546746 by yazu on Friday 12th of August 2011 04:19:15 AM
Old 08-12-2011
itkamaraj's solution is right, mine was wrong

Last edited by yazu; 08-12-2011 at 05:34 AM.. Reason: Deleted
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to delete files by date

My apache logs are saved in the following format (using rotatelogs): Oct 8 01:59 access_log.1002412800 Oct 9 01:55 access_log.1002499200 Oct 10 01:58 access_log.1002585600 Oct 11 01:56 access_log.1002672000 Oct 12 01:59 access_log.1002758400 I would like to run a cronjob once a week to... (2 Replies)
Discussion started by: jamesbond
2 Replies

2. UNIX for Dummies Questions & Answers

How can i delete files in folder by date?

Hi, I have some files on a folder and i want to delete all the files that were created on July. Thanks, Kobi. (9 Replies)
Discussion started by: kobibn
9 Replies

3. UNIX for Dummies Questions & Answers

Delete files by date

Hi, Can anyone help me delete old files in a directory? Let's say, I want to delete all files which are 365 days old. Thank you. (2 Replies)
Discussion started by: risk_sly
2 Replies

4. Solaris

Delete files according to date

Hi All, I am wondering whether is there a way to remove files according to date. For example, I have 500 files between Jan - April, and I want to remove files created only on March. Is there any way to do this? Thanks in advanced. rgds, Ronny (2 Replies)
Discussion started by: ronny_nch
2 Replies

5. Shell Programming and Scripting

find files for a particular date and delete

How can I delete files for a particular date ? I apologize in advance If there is solution please put the link. Thanks, (5 Replies)
Discussion started by: jville
5 Replies

6. Shell Programming and Scripting

Delete files by date

Hello, Due to an error while processing data I have to delete all files created the 4 october on a RED HAT 3 Server. I am wondering if one of you is aware of a command that could only delete all files that were created the Oct 4 This will be very, very, very helpful Thanks for your... (6 Replies)
Discussion started by: Aswex
6 Replies

7. UNIX Desktop Questions & Answers

How to delete files from a specific date?

Guys, I am wondering how to remove files for a specific date in a directory? for instance when I do ls -l , i see many files. And i want to delete files for date May 15: 58252015 May 10 03:45 my_05102012.log 58252015 May 15 06:45 my_05152012.log Thanks (8 Replies)
Discussion started by: DallasT
8 Replies

8. Shell Programming and Scripting

Delete log files content older than 30 days and append the lastest date log file date

To delete log files content older than 30 days and append the lastest date log file date in the respective logs I want to write a shell script that deletes all log files content older than 30 days and append the lastest log file date in the respective logs This is my script cd... (2 Replies)
Discussion started by: sreekumarhari
2 Replies

9. UNIX for Dummies Questions & Answers

Delete files of a particular date

dear all, i m a newbie and i want to delete all files of a particular date,how can i do this? your help appreciated,thanks in advance. OS:RHEL 6 (5 Replies)
Discussion started by: mdabdul
5 Replies

10. UNIX for Dummies Questions & Answers

Delete Files from a date

I'm quite new to Unix but I want to delete some old backup files stored in a directory. the backups are stored on a network storage device located at /mnt/terastation12/backup. I want to delete everything upto one month ago. would the following command in Unix Sun do that? find... (5 Replies)
Discussion started by: dbajtr
5 Replies
XEN-DELETE-IMAGE(8)					 Perl Programmers Reference Guide				       XEN-DELETE-IMAGE(8)

NAME
xen-delete-image - Delete previously created Xen instances. SYNOPSIS
xen-delete-image [options] [--hostname=]imageName1 [--hostname=]imageName2 Help Options: --help Show help information. --manual Read the manual for this script. --version Show the version information and exit. --verbose Show diagnostic output. General options: --dir Specify the output directory where images were previously saved. --evms Specify the EVMS container to use. --lvm Specify the LVM volume to use. Specifying hosts: --hostname Specify the image name to delete. Testing options: --test Don't complain if we're not invoked by root. OPTIONS
--dir Specify the output directory where images were previously saved. --evms Specify the EVMS container where images were previously saved. --help Show help information. --hostname Specify the hostname to delete. --lvm Specify the LVM volume group where images were previously saved. --manual Read the manual for this script. --test Do not complain, or exit, if the script is not executed by the root user. --version Show the version number and exit. DESCRIPTION
xen-delete-image is a simple script which allows you to delete Xen instances which have previously been created by xen-create-image. You must be root to run this script as it removes the Xen configuration file from /etc/xen and potentially removes LVM and EVMS volumes. (When invoked with the '--test' flag the script will continue running, but will fail to remove anything which the user does not have permission to delete.) LOOPBACK EXAMPLE
Assuming that you have three images 'foo', 'bar', and 'baz', stored beneath /home/xen the first two may be deleted via: xen-delete-image --dir=/home/xen foo bar You may also delete them by running: xen-delete-image --dir=/home/xen --hostname=foo --hostname=bar (The matching Xen configuration files beneath /etc/xen will also be removed.) LVM EXAMPLE
Assuming that you have the volume group 'skx-vol' containing three Xen instances 'foo', 'bar', and 'baz' the first two may be deleted via: xen-delete-image --lvm=skx-vol foo bar This will remove the volumes 'foo-disk', 'foo-swap', 'bar-disk', and 'bar-swap'. Note that if the images were created with "--noswap" then the swap volumes will not be present, so will not need to be deleted. The Xen configuration files will also be removed from beneath /etc/xen. EVMS EXAMPLE
Assuming that you have the container 'mycontainer' containing three Xen instances 'foo', 'bar', and 'baz' the first two may be deleted via: xen-delete-image --evms=lvm2/mycontainer --hostname=foo --hostname=bar This will remove the volumes 'foo-disk', 'foo-swap', 'bar-disk', and 'bar-swap'. Note that if the images were created with "--noswap" then the swap volumes will not be present, so will not need to be deleted. The Xen configuration files will also be removed. AUTHORS
Steve Kemp, http://www.steve.org.uk/ Axel Beckert, http://noone.org/abe/ StA~Xphane Jourdois LICENSE
Copyright (c) 2005-2009 by Steve Kemp, (c) 2010 by The Xen-Tools Development Team. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The LICENSE file contains the full text of the license. 4.3.1 2012-06-30 XEN-DELETE-IMAGE(8)
All times are GMT -4. The time now is 03:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy