08-16-2010
- Are all files in same directory?
- Are there subdirectories?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All: I'm not much of a script writer so I could use your input. Here's the objective...
Need a script that will archive (tar) files based on date and then move them into an archive directory. The file names are as follows...
S20070101.001 Year month day
S20070102.001
As you can see... (1 Reply)
Discussion started by: jimmyc
1 Replies
2. Shell Programming and Scripting
Hi,
I am writing a shell script for archive data from a table.
The design is as follows.
Step 1:
Execute the select query and extract the data into a text file.
Step 2:
The primary key for this table is TRACKING_NUM, TRACKING_NUM_SUFFIX, TIMESTAMP_UPDATED. So These three fields will be read... (1 Reply)
Discussion started by: kmanivan82
1 Replies
3. Shell Programming and Scripting
hi guru,
can advise how to construct a housekeeping script using perl for the following ?
find /var/tmp/logs -name "si*" -type f -exec gzip -f {} \;
find /var/tmp/logs -name "*.gz" -type f -exec mv -f {} /var/tmp/log \;
I found out those are not working in shell at when put them on... (1 Reply)
Discussion started by: rauphelhunter
1 Replies
4. Shell Programming and Scripting
Hi All
We have a landing directory where source system puts files.There are variable number of files and the file names are also varying.Each files successful transmission is identified by a .done file.If file name is xyz.dat then the confirmation file will be xyz.dat.done.
I want to... (1 Reply)
Discussion started by: dr46014
1 Replies
5. Shell Programming and Scripting
I'm not sure how to solve the $month-1 thingy or the foreach sentence, so I need some help./*
folders =
folder1
folder2
folder3
folder4
folder5
*/
month=`date +%m`
if($month == 01)
{
prev_month = 12
} else
{
prev_month =... (7 Replies)
Discussion started by: JKMlol
7 Replies
6. Windows & DOS: Issues & Discussions
Hi All,
I have a requirement to archive processed file and retain the archive based on the quantity.. but this is in windows.
I have written a drafted shell script, and would like to have it translated into Batch script.. Please...
Below is the drafted shell script
... (2 Replies)
Discussion started by: Dave Null
2 Replies
7. Shell Programming and Scripting
Hello All,
I need immediate help in creating shell script to call archivebkup.ksh script when archive file system capacity reaches threshold value or 60%
Need to identify the unique file system that reaches threshold value.
ex:
capacity
... (4 Replies)
Discussion started by: sasikanthdba
4 Replies
8. Shell Programming and Scripting
Hello,
I am working through a test Linux script from a website, and am running into some issues. The point of the script is to find image files throughout the system, copy them to one centralized directory,ignore duplicate images with the same name, and output a text file of all the images copied.... (3 Replies)
Discussion started by: ComSciguy17
3 Replies
9. Shell Programming and Scripting
Hi Guys,
I am unable to archive the FTP files from FTP source path to FTP archive path.Currently i am running this script from the Local server. Can someone help me here.
Code:
#!/bin/ksh
set -x
HOST='xxxx'
USER='xxxx'
PASSWD='xxxx'
PORTNO='9999'
FILE_NAME=$1
FTP_SRC_PATH=$2... (2 Replies)
Discussion started by: spidy
2 Replies
10. Shell Programming and Scripting
Requirement:
Under fuse application we have placeholders called containers;
Every container has their logs under:
<container1>/data/log/fuse.log
<container1>/data/log/fuse.log.1
<container1>/data/log/fuse.log.XX
<container2>/data/log/fuse.log... (6 Replies)
Discussion started by: Arjun Goswami
6 Replies
LEARN ABOUT OPENSOLARIS
cachefspack
cachefspack(1M) System Administration Commands cachefspack(1M)
NAME
cachefspack - pack files and file systems in the cache
SYNOPSIS
cachefspack [-h] [-i | -p | -u] [-f packing-list]
[-U cache-directory] [file]...
DESCRIPTION
The cachefspack 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 are in the cache whenever possible.
cachefspack does not pack files when the backfileystem type for the cachefs mount is NFSv4. This is because only pass-through support is
available for cachefs with NFSv4.
OPTIONS
The following options are supported:
-f packing-list Specify a 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 on the packingrules(4) manual page.
Directories are packed recursively. Symlinks that match a regular expression on a LIST command are followed. Symlinks
encountered while recursively processing directories are not followed.
-h Help. Print a brief summary of all the options.
-i View information about the packed files.
-p Pack the file or files specified by file. This is the default behavior.
-u Unpack the file or files specified by file.
-U cache-directory Unpack all files in the specified cache directory.
OPERANDS
The following operands are supported:
file A path name of a file to be packed or unpacked.
USAGE
See largefile(5) for the description of the behavior of cachefspack when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
EXAMPLES
Example 1 Packing a File in the Cache
The following example packs the file projects in the cache:
% cachefspack -p projects
Example 2 Packint Files in the Cache
The following example packs the files projects, updates, and master_plan in the cache:
% cachefspack -p projects updates master_plan
Example 3 Unpacking a File From the Cache
The following example unpacks the file projects from the cache:
% cachefspack -u projects
Example 4 Unpacking Files From the Cache
The following example unpacks the files projects, updates, and master_plan from the cache:
% cachefspack -u projects updates master_plan
Example 5 Unpacking All Files From in a Cache Directory
The following example unpacks all files in the cache directory cache1:
% cachefspack -U /cache/cache1
Example 6 Using a Packing List
The following example illustrates the use of a packing list to specify files to be packed in the cache.
The contents of lists.pkg are as follows:
IGNORE SCCS BASE /src/junk LIST *.c LIST *.h
The following command packs all files in the /src/junk directory which have .c and .h extensions, and do contain the string SCCS in the
file's path name:
% cachefspack -f lists.pkg
EXIT STATUS
0 Successful completion.
>0 An error occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
cfsadmin(1M), mount_cachefs(1M), packingrules(4), attributes(5), largefile(5)
SunOS 5.11 18 Mar 2004 cachefspack(1M)