dear all,
i want to copy all files in my home dir to another.
from my home dir i have given ls -la then
some hidden files are there with dot . .. and i also want to copy all dirs in my home as it is . because iam upgrading the system
how to copy all files and dirs in my home dir... (1 Reply)
Hi. I have a script which is deleting files with a particular extension and older than 45 days.The code is:
find <path> -name "<filename_pattern>" -mtime +45 -exec rm {} \;
But the problem is that some important files are also getting deleted.To prevent this I have decide to make a dummy... (4 Replies)
I want to backup all the directory tress, including hidden directories, without copying any files.
find . -type d gives the perfect list.
When I tried tar, it won't work for me because it tars all the files.
find . -type d | xargs tar -cvf a.tar
So i tried rsync.
On my own test box, the... (4 Replies)
I usually use ls -al | awk '{sum = sum + $5} END {print sum}' to sum the size of all files in a directory. However this command includes the hidden files.
Is there a command to just add up all the files/sub-directories excluding the hidden files (begins with . and ..)
I wanted to check the... (10 Replies)
Hi,
In one folder there is a hidden folder. Whenever i do any ls -a i can't see the folder. However i can get into the folder by cd .foldername.
Would you please help me to identify what is the problem here. (13 Replies)
I want to list all directories hidden or not hidden.
ls -ld */ => shows only not hidden directories
so i guess the answer would be to add the a option to show all files
ls -lad */ => not working :confused:
ls -la | grep "^d" => works
But I would like to know why I can't use ls -lad... (4 Replies)
I need to pull down a good bit of files for another support team for an upgrade project. I have a server.list with all of the server names.
I need to do two parts:
FIRST:
I have this example, but it does not list the server name in front of each line.
#! /bin/bash
for server in $(<... (10 Replies)
Hi,
I need to find a solution for backing up/transferring BACKUP (dump file) from AIX (specifically) to Windows 2012 Hidden Share.
The vendor says that he cannot do a copy from his system to hidden share because it requires a password...
Personally, I think that there should be a solution... (9 Replies)
Discussion started by: pob579
9 Replies
LEARN ABOUT DEBIAN
ropkg::rsync::atom
RoPkg::Rsync::Atom(3pm) User Contributed Perl Documentation RoPkg::Rsync::Atom(3pm)NAME
RoPkg::Rsync::Atom - the smallest unit in a rsync configuration file
SYPONSIS
#!/usr/bin/perl
use strict;
use warnings;
use RoPkg::Rsync::Atom;
sub main {
my $a = new RoPkg::Rsync::Atom(
type => 'param',
name => 'uid',
value => 'nobody',
);
print $a->ToString(0),$/;
return 0;
}
main();
DESCRIPTION
RoPkg::Rsync::Atom is a class used by RoPkg::Rsync modules. The Atom is considered the smallest part of any rsync configuration file. An
atom can be (at this moment):
param
blank
comment
METHODS
All methods, throw the OutsideClass exception, if you use them as class methods.
Example:
perl -MRoPkg::Rsync::Atom -e 'RoPkg::Rsync::Atom->Type;'
Called outside class instance
Besides OutsideClass the methods are throwing other exceptions as well. Refer to each method documentation for more information.
new()
The constructor of the class. new accepts 3 parameters grouped inside a hash:
*) type - type of the atom
*) name - name of the atom
*) value - value of the atom
The type parameter must always be present. If the type parameter is not present, a Param::Missing exception is raised. At this moment, the
atoms have 3 types:
*) param - a parameter in the standard form (name = value)
*) comment - a comment
*) blank - a blank line (or only with separators)
If the value of the type parameter is not one of the ones specified a Param::Wrong exception is raised.
Examples:
example 1 (param):
my $a = new RoPkg::Rsync::Atom(
type => 'param',
name => 'gid',
value => 'users',
);
example 2 (param):
my $a = new RoPkg::Rsync::Atom(type => 'param');
$a->Name('gid');
$a->Value('users');
print 'Name of the atom is:',$a->Name,$/;
example 3 (comment):
my $a = new RoPkg::Rsync::Atom(
type => 'comment',
value => '# this is the group id',
);
example 4 (blank):
my $a = new RoPkg::Rsync::Atom(
type => 'blank',
value => q{ },
);
Name($new_name)
The Name method is a get/set method. If $new_name exists (and his value is defined) then the set behaviour is selected, otherwise the
method acts as a get method. Returns the name of the atom.
Value($new_value)
The Value method is a get/set method. If $new_value exists (and his value is defined) then the set behaviour is selected, otherwise the
method acts as a get method. Returns the value of the atom.
ToString($indent, $spaces)
Returns the string representation of the atom. Accepts 2 parameters: indent and spaces. $indent is a true/false value specifing that the
string representation should be prefixed with a tab character; $spaces is used to compute the number of spaces that should be added after
the atom name, so that the total length of the parameter name to match the $spaces value.
Example:
my $a = new RoPkg::Rsync::Atom(
type => 'param',
name => 'gid',
value => 'users',
);
print $a->ToString(0, 6),$/,
$a->ToString(0, 5),$/,
$a->ToString(0, 4),$/,
$a->ToString(0, 3),$/,
$a->ToString(1, 6),$/,
$a->ToString(1, 5),$/,
$a->ToString(1, 4),$/,
$a->ToString(1, 3),$/;
The result is:
gid = users
gid = users
gid = users
gid = users
gid = users
gid = users
gid = users
gid = users
Type
Returns the type (string representation) of the atom.
PREREQUISITES
perl 5.008 (or later) is required. Besides perl, you must have the following:
RoPkg::Exceptions
English
Scalar::Util
SEE ALSO
RoPkg::Rsync::Node RoPkg::Rsync::ConfFile RoPkg::Exceptions
AUTHOR
Subredu Manuel <diablo@iasi.roedu.net>
LICENSE
Copyright (C) 2005 Subredu Manuel. 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.
perl v5.8.8 2006-06-09 RoPkg::Rsync::Atom(3pm)