I need to remove files that are in archive directory and which are old. I can make use of find command to search for files which are older by number of days.
But the problem is there are sub directories in directory 'archive' like 'sub1' 'sub2' 'sub3'.
Now all files which are in 'archive/sub1' should be deleted if they are old by 30 days.
All files which are in 'archive/sub2' should be deleted if they are old by 90 days.
Now all files which are in 'archive/sub3' should be deleted if they are old by 120 days.
If the files are in 'archive/' then they should be deleted if they are older by 365 days.
I want to create a properties file like
and I want to write a shell script that reads location from above file to know the period of days.
Hi there,
I have a scritp that is clearing out old files from some directories, rather than echoing the name of the file when it gets deleted i want to echo a ". " I have tried to just echo it after the deletion but it lists like this
.
.
.
.
I want to show it like this
. . . . . . . . .... (1 Reply)
hi i ama dunmmies in Unix.
I created a .doc file and copied it to unix via FTP as a ,doc file itself
i want to delete that file , i tried with rm command it does not work
file name is DDL's.doc
plz help :confused: (2 Replies)
Hi,
I am archived two files using tar. Then I tried to extract the file in Windows. But only one file extracted. Other file is NOT extracted as the UNIX file name NOT compatible with Windows platform (In my case semicolon operator included in file name). Is it possible to rename the file (... (1 Reply)
Hello,
1)Can anybody please tell me that how can i open a file that is archived.
Like say i have a file say 1.txt archived inside 1.tar.
2)So how can i open this file to perform operations on this file (1.txt) using "open" system call and perform other system calls like "read" and "write" ,but... (1 Reply)
hi all,
i want to write a shell script which can automatically touch my all files within a folder in an interval of 90 days ...so that i can avoid them being archived.
I don't want to manually touch the all files instead i want an automated shell script to do this.
Thanks in advance,
Om (3 Replies)
I have below line in a unix file, I want to delete one character after "Â".
20091020.Non-Agency CMO Daily Trade Recap Â~V Hybrids
The result should be :
20091020.Non-Agency CMO Daily Trade Recap  Hybrids
i dont want to use "~V" anywhere in the sed command or any other command, just remove... (1 Reply)
I have a data set that has 4 columns, I want to know if I can delete duplicate lines while ignoring one of the columns, for example
10 chr1 ASF 30
15 chr1 ASF 20
5 chr1 ASF 30
6 chr2 EBC 15
4 chr2 EBC 30
...
I want to know if I can delete duplicate lines while ignoring column 1, so the... (5 Replies)
Hello,
A while back someone"archived" my emails for me, so I didn't have to worry about my email account filling up with emails.
I need to get back into those emails and view them.
When I opent the folder it has several files. The largest being an "mbox", which I am assuming has all of... (3 Replies)
I have an old database that ran on UNIX/LINUX that was archived and stored years ago. We currently run on Windows and have no way to open/view this database or recover data. Does anyone have any experience or know how to recover? All I know is that it was a UniVerse IBM product.
Thanks! (2 Replies)
Discussion started by: Chantelle
2 Replies
LEARN ABOUT DEBIAN
archive::any
Archive::Any(3pm) User Contributed Perl Documentation Archive::Any(3pm)NAME
Archive::Any - Single interface to deal with file archives.
SYNOPSIS
use Archive::Any;
my $archive = Archive::Any->new($archive_file);
my @files = $archive->files;
$archive->extract;
my $type = $archive->type;
$archive->is_impolite;
$archive->is_naughty;
DESCRIPTION
This module is a single interface for manipulating different archive formats. Tarballs, zip files, etc.
new
my $archive = Archive::Any->new($archive_file);
my $archive = Archive::Any->new($archive_file, $type);
$type is optional. It lets you force the file type in-case Archive::Any can't figure it out.
extract
$archive->extract;
$archive->extract($directory);
Extracts the files in the archive to the given $directory. If no $directory is given, it will go into the current working directory.
files
my @file = $archive->files;
A list of files in the archive.
mime_type
my $mime_type = $archive->mime_type();
Returns the mime type of the archive.
is_impolite
my $is_impolite = $archive->is_impolite;
Checks to see if this archive is going to unpack into the current directory rather than create its own.
is_naughty
my $is_naughty = $archive->is_naughty;
Checks to see if this archive is going to unpack outside the current directory.
DEPRECATED
type
my $type = $archive->type;
Returns the type of archive. This method is provided for backwards compatibility in the Tar and Zip plugins and will be going away
soon in favor of "mime_type".
PLUGINS
For detailed information on writing plugins to work with Archive::Any, please see the pod documentation for Archive::Any::Plugin.
AUTHOR
Clint Moore <cmoore@cpan.org>
AUTHOR EMERITUS
Michael G Schwern
SEE ALSO
Archive::Any::Plugin
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Archive::Any
You can also look for information at:
o AnnoCPAN: Annotated CPAN documentation
<http://annocpan.org/dist/Archive-Any>
o CPAN Ratings
<http://cpanratings.perl.org/d/Archive-Any>
o RT: CPAN's request tracker
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Archive-Any>
o Search CPAN
<http://search.cpan.org/dist/Archive-Any>
LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See <http://www.perl.com/perl/misc/Artistic.html>
perl v5.10.0 2008-06-25 Archive::Any(3pm)