Sponsored Content
Top Forums Shell Programming and Scripting Rsync - how to copy hidden folder or hidden files when using full path Post 303004731 by jcdole on Saturday 7th of October 2017 04:40:35 PM
Old 10-07-2017
Rsync - how to copy hidden folder or hidden files when using full path

Hello.
I use this command :
Code:
rsync -av --include=".*" --dry-run "$A_FULL_PATH_S"  "$A_FULL_PATH_D"

The data comes from the output of a find command.
And no full source directories are in use, only some files.

Source example
Code:
A_FULL_PATH_S="/backup_sys/¬001_INSTALL/¬100_ETC_and_USER_MODIFIED_FILES/2017_10_06_22h30/home/install_user/.some_dir/some_file"

or
Code:
A_FULL_PATH_S="/backup_sys/¬001_INSTALL/¬100_ETC_and_USER_MODIFIED_FILES/2017_10_06_22h30/home/install_user/some_dir/.some_file"

Corresponding destination
Code:
A_FULL_PATH_D="/home/install_user/.some_dir/some_file"

or
Code:
A_FULL_PATH_D="/home/install_user/some_dir/.some_file"

Any help is welcome.
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

recursive copy of hidden files

I need to know how to copy hidden files recursively? cp -r sourceDir/* targetDir/. ignores the hidden files. Thank you!! (2 Replies)
Discussion started by: usfrog
2 Replies

2. UNIX for Dummies Questions & Answers

how to copy hidden files from one folder to another

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)
Discussion started by: rajan_ka1
1 Replies

3. Shell Programming and Scripting

Finding Hidden files and protecting the folder containing hidden files from deletion

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)
Discussion started by: pochaw
4 Replies

4. UNIX for Advanced & Expert Users

How to rsync or tar directory trees, with hidden directory, but without files?

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)
Discussion started by: fld2007
4 Replies

5. UNIX for Dummies Questions & Answers

hidden files

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)
Discussion started by: lhareigh890
10 Replies

6. Shell Programming and Scripting

Not visible hidden folder

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)
Discussion started by: anupdas
13 Replies

7. UNIX for Dummies Questions & Answers

List all directories hidden or not hidden

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)
Discussion started by: servus
4 Replies

8. Shell Programming and Scripting

Copy down remote files and rename them to include the server name with full path

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)
Discussion started by: asnatlas
10 Replies

9. AIX

Copy to Windows hidden share

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
RoPkg::Rsync::Node(3pm) 				User Contributed Perl Documentation				   RoPkg::Rsync::Node(3pm)

NAME
RoPkg::Rsync::Node DESCRIPTION
A node is a rsync module. A node is formed of zero or more atoms. Example: [debian] path = /var/ftp/pub/mirrors/debian.org/ #This comment will show on rsync -v comment = Debian Mirror list = yes [debian] is the node. The node name is debian. The node has 4 atoms: *) param atom (path) *) comment atom (the comment) *) param atom (comment) *) param atom (list) SYNOPSIS
#!/usr/bin/perl use strict; use warnings; sub main { my $node = new RoPkg::Rsync::Node(node_name => 'debian'); $node->AddParam('path', '/var/ftp/pub/mirrors/debian.org'); $node->AddComment('#This comment will show on rsync -v'); $node->AddParam('comment', 'Debian Mirror'); $node->AddParam('list', 'yes'); print $node->ToString(); } main(); The result is: [debian] path = /var/ftp/pub/mirrors/debian.org #This comment will show on rsync -v comment = Debian Mirror list = yes METHODS
All methods, throw the OutsideClass exception, if you use them as class methods. Besides OutsideClass the methods are throwing other exceptions as well. Refer to each method documentation for more information. new(%hash) The constructor of the class. Expects a hash as parameter. At this time, the only valid option is node_name . Any other option will be dis- carded. The node_name is a required parameter. If is not defined, a Param::Missing exception will be raised. Example: my $node = new RoPkg::Rsync::Node(node_name => 'debian'); Add(%atom_details) Add a new atom to the node. The atom details (type, name and value) are keys from the hash. All three parameters must be defined. There are 2 special cases: when the atom is a comment or a blank. In both cases, RoPkg::Rsync::Node generates a name for them. If the atom is a com- ment or a blank the returned value is the name of the atom. If the atom is a parameter, the total number of atoms for this node is returned. Example: $node->Add( type => 'param', name => 'path', value => '/var/ftp/pub/mirrors/debian.org', ); The returned value is the total number of atoms for this node. Example: $node->Add( type => 'comment', value => '#This comment will show on rsync -v', ); The returned value is the name of the atom (the name is autogenerated). Exceptions: *) Param::Missing - $atom_details{type} is not defined *) Param::Wrong = $atom_details{name} or $atom_details{value} are not defined AddParam($pname, $pvalue) A wrapper around Add provided for comodity. See Add documentation for more details about the behaviour. AddComment($comment_value) A wrapper around Add provided for comodity. See Add documentation for more details about the behaviour. AddBlank($blank_value) A wrapper around Add provided for comodity. See Add documentation for more details about the behaviour. GetAtom(%atom_details) Returns a RoPkg::Rsync::Atom object based on parameters specified in %atom_details. The %atom_details fields can be: type, name and value. type and value must be specified. Exceptions: *) Param::Missing - type/name were not specified *) Param::Unknown - no objects were found Take note that only the first object who match the criterias is returned. GetParam($name) A wrapper around GetAtom provided for comodity. See GetAtom documentation for more details about the behaviour. GetComment($name) A wrapper around GetAtom provided for comodity. See GetAtom documentation for more details about the behaviour. GetBlank($name) A wrapper around GetAtom provided for comodity. See GetAtom documentation for more details about the behaviour. GetAll() Returns a array with all the atoms of the node. In scalar context returns the number of atoms. GetAtomsNo() Returns the number of atoms for this node. Has($atom) Returns 1 if the $atom object is already a atom for this node, 0 otherwise. Delete($atom_name) Removes the atom those name is $atom_name. Returns 1 on success (the atom was found and removed), 0 otherwise. Name($node_name) get/set method for node name. Using this method you can change the node name or find it. ToString($indent, $include_node_name) Returns the string representation of the node. If $indent is true, the atoms are indented. If $include_node_name is true, the node name will be included in the string. Example: $node = new RoPkg::Rsync::Node(node_name => 'debian'); $node->AddParam('gid', 'users'); print $node->ToString(0, 0),$/, $node->ToString(0, 1),$/, $node->ToString(1, 1),$/, $node->ToString(),$/; The result is: gid = users [debian] gid = users; [debian] gid = users [debian] gid = users PREREQUISITES
perl 5.008 (or later) is required. Besides perl, you must have the following: *) RoPkg::Exceptions *) Scalar::Util *) English SEE ALSO
RoPkg::Rsync::Atom 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::Node(3pm)
All times are GMT -4. The time now is 07:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy