Hello, this is probably another really simple tasks for most of you gurus, however I am trying to make a script which takes an input, greps a specific file for that input, prints back to screen the results (which are directory names) and then be able to use the directory names to move files.... (1 Reply)
Hi,
Please help me on this.
Suppose i have the following directory structure.
/app/data
/app/data/eng
/app/data/med
/app/data/bsc
each of the directories data,data/eng,data/med,data/bsc holds files with date extension like
a.20081230
b.20081230 and so on
I need a script to loop... (9 Replies)
I want to move the files in a dir to different dirs based on their file names.
Ex: i have 4 different files with name -
CTS_NONE_10476031_MRL_PFT20081215a.txt
CTS_NONE_10633009_MRL_PFT20091020a.txt
CTS_NONE_10345673_MRL_PFT20081215a.txt
CTS_NONE_10872456_MRL_PFT20091020a.txt
and the 1st... (2 Replies)
I want to move the files in a dir to different dirs based on their file names.
Ex: i have 4 different files with name -
CTS_NONE_10476031_MRL_PFT20081215a.txt
CTS_NONE_10633009_MRL_PFT20091020a.txt
CTS_NONE_10345673_MRL_PFT20081215a.txt
CTS_NONE_10872456_MRL_PFT20091020a.txt
and the 1st... (4 Replies)
Hello,
I need help finding a script that will allow me to move files from one directory to another directory 10k files at a time.
I have a directory that has 100 K files in it. I need to have those 100k files broken apart to separate directories each with 10k files in them.
Here is the... (8 Replies)
I have just purchased my first ever Apple computer - and am therefore new to UNIX also.
I would like to create a simple "batch file" (apologies if this is the wrong terminology) to do the following:
When I plug my camera into the MAC it automatically downloads photos and videos into a new... (1 Reply)
I would like to transfer all files ending with .log from /tmp and to /tmp/archive (using find )
The directory structure looks like :-
/tmp
a.log
b.log
c.log
/abcd
d.log
e.log
When I tried the following command , it movies all the log files... (8 Replies)
Hi,
In a parent directory there are several files in the form
IDENTIFIER1x
IDENTIFIER1.yyy
IDENTIFIER1_Z, etc
IDENTIFIER2x
IDENTIFIER2.yyy
IDENTIFIER2_Z, etc
IDENTIFIER3x
IDENTIFIER3.yyy,
IDENTIFIER3_Z, etcIn the same parent directory there are corresponding directories named... (7 Replies)
I've got this script to loop through all folders and move files that are more than 2 years old. I'm using the install command because it creates the necessary directories on the destination path and then I remove the source. I'd like to change the script to use the mv command since it is much... (4 Replies)
Hello,
I'm a first time poster looking for help in scripting a task in my daily routine. I am new in unix but i am attracted to its use as a mac user.
Bear with me...
I have several files (20) that I manually drag via the mouse into several named directories over a network. I've used rsync... (14 Replies)
Discussion started by: SonnyClark
14 Replies
LEARN ABOUT CENTOS
pmfetcharchive
PMFETCHARCHIVE(3) Library Functions Manual PMFETCHARCHIVE(3)NAME
pmFetchArchive - get performance metrics directly from an archive log
C SYNOPSIS
#include <pcp/pmapi.h>
int pmFetchArchive(pmResult **result);
cc ... -lpcp
DESCRIPTION
pmFetchArchive is a variant of pmFetch(3) that may only be used when the current Performance Metrics Application Programming Interface
(PMAPI) context is associated with an archive log.
The result is instantiated with all of the metrics (and instances) from the next archive record, consequently there is no notion of a list
of desired metrics, and the instance profile of the PMAPI context is ignored.
It is expected that pmFetchArchive would be used to create utilities that scan archive logs, while the more common access to the archives
would be via the pmFetch(3) interface.
To skip records within the archive log, use pmSetMode(3) to change the collection time within the current PMAPI context, then call
pmFetchArchive.
Note that the result returned by pmFetchArchive is dynamically allocated, and must be released using pmFreeResult(3), not free(3C). See
pmFetch(3) and pmFreeResult(3) for further details.
pmFetchArchive returns zero on success.
SEE ALSO PMAPI(3), pmFetch(3), pmFreeResult(3), pmNewContext(3), pmSetMode(3) and pmTrimNameSpace(3).
DIAGNOSTICS
PM_ERR_NOTARCHIVE
the current PMAPI context is not associated with an archive log
Performance Co-Pilot PCP PMFETCHARCHIVE(3)