Greetings -
I am a newbie in shell scripts. I have been thru the whole forum but there has been no similar query posed.
The objective of my system is to have a unified filebase system. I am using RSync to synchronise files between the location & central server with both of them having the... (4 Replies)
hi all.
Please help me with archiving previous day syslog files.
the files have no extension and have the format YYYY-MM-DD.
I want to archive the file then move it to some other machine.
thanks. (2 Replies)
Hey, this might be a really basic question, but I'm new to Unix scripting.
I'm trying to find a command to replicate a file structure from one location to another & move the actual files contained in the base directories, i.e. I have this structure -
home/temp/test/dir1/ ... (3 Replies)
HI,
I need to move all files from a dir & its all subdir to Archive folder which is indise dir only. and moved filename should changed to complete path ( Like Dir_subdir_subdir2_.._filename ). also all files names shoud capture in a file in order to mail
I written below code ... (11 Replies)
Hi all
I wrote a little script that search for a file and moves it, its like this:
#!/bin/ksh
today=`date +"%d_%m_%y"`
if ;
then
mkdir -p /tmp/bigfiles/$today
mv $1 /tmp/bigfiles/$today/
echo "moving big file from /home/appcwec " | mailx -s "bigfile" ffff@yyy.com
else
... (4 Replies)
I' writing a script trying to archive the oldest two directories from one place, tar them, and move them to another.
#!/bin/bash
cd (/dir/with/dirforarchiving)
ARCHIVE=(/temp/dir/)
FIND=$(find . -maxdepth 1 -type d)
ARRAY=(`ls ${FIND} -ltd | tail -2`)
names=(${ARRAY} ${ARRAY})... (4 Replies)
Hi All,
I have a large amount of files that I need to copy from one server to another server using SFTP. Can comeone please help me with the command I would use here?
Here is what I am thinking, but being new at this I know this is probably wrong:
Login to the destination host using... (1 Reply)
I have a dilemma, we have users who are copying files to "directory 1." These images have file names which include the year it was taken. I need to put together a script to do the following:
Examine the file naming convention, ensuring it's the proper format (e.g. test-1983_filename-123.tif)... (8 Replies)
Discussion started by: Nvizn
8 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)