04-04-2016
How to move gz files from one source directory to destination directory?
Hi All,
Daily i am doing the house keeping in one of my server and manually moving the files which were older than 90 days and moving to destination folder.
using the find command . Could you please assist me how to put the automation using the shell script .
source_directory=/opt/psoft/projects/*.gz files
destination_directory=/opt/psoft/projects/scripts/
In the source directory contains all the zip files and these files need to copy to destination directory which were older than 90days.
9 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
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)
Discussion started by: rssrik
1 Replies
2. UNIX for Dummies Questions & Answers
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)
Discussion started by: briandanielz
2 Replies
3. UNIX for Dummies Questions & Answers
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)
Discussion started by: kedar.mehta
4 Replies
4. Shell Programming and Scripting
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)
Discussion started by: chetancrsp18
1 Replies
5. UNIX for Dummies Questions & Answers
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)
Discussion started by: dssyadav
0 Replies
6. Shell Programming and Scripting
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)
Discussion started by: charli1
6 Replies
7. Shell Programming and Scripting
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)
Discussion started by: ROCK_PLSQL
14 Replies
8. UNIX for Beginners Questions & Answers
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)
Discussion started by: Siddheshk
2 Replies
9. Shell Programming and Scripting
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 HPUX
cachefspack
cachefspack(1M) cachefspack(1M)
NAME
cachefspack - pack files and file systems in the cache
SYNOPSIS
packing-list ] cache-directory ] [ file ... ]
DESCRIPTION
The utility is used to set up and maintain files in the cache. This utility affords greater control over the cache, ensuring that the
specified files will be in the cache whenever possible.
Options
recognizes the following options:
Display pathname of the files to be cached.
Specify a
packing-list file containing a list of files and directories to be packed. Options within subdirectories and files can also
be specified. The format and rules governing packing-list are described in packingrules(4). Directories are packed recur-
sively. Symlinks that match a regular expression on a LIST command are followed. Symlinks encountered while recursively
processing directories are not followed.
Print a brief help summary of all the options.
View information about the packed files.
Pack the file or files specified by
file. This is the default behavior.
Strip "./" from the beginning of a pattern name.
Unpack the file or files specified by
file.
Unpack all files in the specified
cache-directory, under which the cache is stored.
Operands
recognizes the following operands:
file A path name of a file to be packed or unpacked.
RETURN VALUE
returns the following values:
Successful completion.
An error occurred.
EXAMPLES
Pack the file projects in the cache.
Pack the files projects, updates and master_plan in the cache.
Unpack the file projects from the cache.
Unpack the files projects, updates and master_plan from the cache.
Unpack all files in the cache1 cache directory.
Use the lists.pkg packing-list to specify files to be packed in the cache. The contents of lists.pkg are as follows:
This example will pack all files in the directory /src/junk with .c and .h extensions that do not contain the string SCCS in the file's
path name.
AUTHOR
was developed by Sun Microsystems, Inc.
SEE ALSO
cfsadmin(1M), mount_cachefs(1M), packingrules(4)
cachefspack(1M)