Dear Folks,
I have to backup pgsql database dump everynight on a routine. The database dump actually contains sql(text) statements. The actual size of the database dump is aroung 800 MB. Between two days backup, only few lines of statements are modified/added/deleted.
I dont want to do... (1 Reply)
Is this possible? Let me know If I need specify further on what I am trying to do- I just want to spare you the boring details of my personal file management.
Thanks in advance-
Brian- (2 Replies)
I am trying to move file created/modified in 2008 year to <new directory>. But trapped badly in Xargs {}.
Looks like mv is not getting destination file properly. It assumes source file s to be destination directory n gives me erroir. "Target must be a directory"
Run-
#/home/mktrisk: find... (4 Replies)
Move all files starting with a specific name to different directory.
This shell script program should have three parameters
File Name
Source Directory
Destination Directory
User should be able to enter ‘AB_CD*' in file name parameter. In this case all the files starting with AB_CD will... (1 Reply)
Hi,
need to zip all files in a directory and move to another directory after the zip..
i am using this one but didnt help me...
zip -r my_proj_`date +%Y%m%d%H%MS`.zip /path/my_proj
mv in_proj_`date +%Y%m%d%H%M%S`.zip /path/source/
i am trying to zip all the files in my_proj... (0 Replies)
Hi all,
i have a folder, with tons of files containing as following,
on /my/folder/jobs/
some_name_2016-01-17-22-38-58_some name_0_0.zip.done
some_name_2016-01-17-22-40-30_some name_0_0.zip.done
some_name_2016-01-17-22-48-50_some name_0_0.zip.done
and these can be lots of similar files,... (6 Replies)
Hi All,
We have main directory called "head"
under this we have several sub directories and under these directories we have sub directories.
My requirement is I have to find the SQL files which are having the string "procedure" under "head" directory and sub directories as well.
And create... (14 Replies)
I need a rsync command which will exclude certain files and directories from source and copy the rest. I got this command working,
sudo rsync -avzh --exclude 'bin' --exclude 'braintree' --exclude 'colinmollenhour' --exclude 'composer' --exclude 'doctrine' --exclude 'fabpot' --exclude... (2 Replies)
Looking for a script or command to -
Move a very large directory with tens of thousands of files and sub-directories recursively (filenames can include spaces) and replace with symlinks pointing to the new location at the same time so there is no downtime
Looking for speed + safety :o (5 Replies)
Discussion started by: carnagel
5 Replies
LEARN ABOUT DEBIAN
lib::abs
lib::abs(3pm) User Contributed Perl Documentation lib::abs(3pm)NAME
lib::abs - "lib" that makes relative path absolute to caller.
SYNOPSIS
Simple use like "use lib ...":
use lib::abs qw(./mylibs1 ../mylibs2);
use lib::abs 'mylibs';
Extended syntax (glob)
use lib::abs 'modules/*/lib';
There are also may be used helper function from lib::abs (see example/ex4):
use lib::abs;
# ...
my $path = lib::abs::path('../path/relative/to/me'); # returns absolute path
DESCRIPTION
The main reason of this library is transformate relative paths to absolute at the "BEGIN" stage, and push transformed to @INC. Relative
path basis is not the current working directory, but the location of file, where the statement is (caller file). When using common "lib",
relative paths stays relative to curernt working directory,
# For ex:
# script: /opt/scripts/my.pl
use lib::abs '../lib';
# We run `/opt/scripts/my.pl` having cwd /home/mons
# The @INC will contain '/opt/lib';
# We run `./my.pl` having cwd /opt
# The @INC will contain '/opt/lib';
# We run `../my.pl` having cwd /opt/lib
# The @INC will contain '/opt/lib';
Also this module is useful when writing tests, when you want to load strictly the module from ../lib, respecting the test file.
# t/00-test.t
use lib::abs '../lib';
Also this is useful, when you running under "mod_perl", use something like "Apache::StatINC", and your application may change working
directory. So in case of chdir "StatINC" fails to reload module if the @INC contain relative paths.
RATIONALE
Q: We already have "FindBin" and "lib", why we need this module?
A: There are several reasons:
1) "FindBin" could find path incorrectly under "mod_perl"
2) "FindBin" works relatively to executed binary instead of relatively to caller
3) Perl is linguistic language, and `use lib::abs "..."' semantically more clear and looks more beautiful than `use FindBin; use lib
"$FindBin::Bin/../lib";'
4) "FindBin" b<will> work incorrectly, if will be called not from executed binary (see <http://github.com/Mons/lib-abs-vs-findbin>
comparison for details)
BUGS
None known
COPYRIGHT & LICENSE
Copyright 2007-2010 Mons Anderson.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
Mons Anderson, "<mons@cpan.org>"
CONTRIBUTORS
Oleg Kostyuk, "<cub@cpan.org>"
perl v5.10.1 2010-11-16 lib::abs(3pm)