Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
EDITED
A Bash script that copies files from a list to your backup location with parent directories in tack. Set configuration at top and run. Ment to be run from users home dir. but you can change location to which ever you like with "cd" in the script.
rsync -a --existing --update $HOME/ /backup/folder/location
to keep them updated. With method 2, you don't need to keep a file list - simply populate the destination directory. Caveats: don't overlook the trailing slash on the source directory ($HOME); and very deep (10,000 file) home directories incur a penalty performance often alleviated by an --exclude pattern. Check the man pages for details.
Looked at them options already... execpt I just want to copy useful files, such as configuration and rc files. copying the directory they are in only helps me remember where they are located in my home directory. the --parent option is good, but wanted to remove all the extra directories...
http://search.cpan.org/~dmuey/File-Copy-Recursive-0.38/Recursive.pm#fcopy() wrote:
fcopy()
This function uses File::Copy's copy() function to copy a file but not a directory. Any directories are recursively created if need be. One difference to File::Copy::copy() is that fcopy attempts to preserve the mode (see Preserving Mode below) The optional $buf in the synopsis if the same as File::Copy::copy()'s 3rd argument returns the same as File::Copy::copy() in scalar context and 1,0,0 in list context to accomidate rcopy()'s list context on regular files.
Haven't used it, but it appears to me that it would 1) copy file and keep permissions etc 2) make path if not existsing but 3) not copy all the files only the one that you indicate.
http://search.cpan.org/~dmuey/File-Copy-Recursive-0.38/Recursive.pm#fcopy() wrote:
fcopy()
This function uses File::Copy's copy() function to copy a file but not a directory. Any directories are recursively created if need be. One difference to File::Copy::copy() is that fcopy attempts to preserve the mode (see Preserving Mode below) The optional $buf in the synopsis if the same as File::Copy::copy()'s 3rd argument returns the same as File::Copy::copy() in scalar context and 1,0,0 in list context to accomidate rcopy()'s list context on regular files.
Haven't used it, but it appears to me that it would 1) copy file and keep permissions etc 2) make path if not existsing but 3) not copy all the files only the one that you indicate.
Yes, that's what it's suppose to do.. Just can't figure out the syntax when I want to make the directory that doesnt exist already, having trouble with ignoring the files in the base directory and moving on to creating the folders that dont exist before copying the selected file.
Re: Bashing a dot file backup script [help please]
 by dasein » 19 Jan 2017, 03:30
I'm starting to suspect homework
Nope, not in school, but yeah I am teaching myself, so I guess it is homework, in a way...
I got this figured out now. Thanks to any that helped out. Turns out I was making way more complicated then I had too, as you probably well can see from the new script above.
I dont believe this is a bash function... looks like perl...
Uhm... yeah but you were already using sed and there is no reason why you cannot use perl inside a shell script. Also, it seems to me that some things are just easy to do in perl or let's say awk, like stream editing, data selection/rearrangement/summarization. I guess I support a kind of "use what you can find"-type of attitude to these things. But yeah, what you have now apparently works and does not seem to be anyhow convoluted.