mantaFind: Recursive find tool for retrieving matching objects/subdirs...

Description Usage Arguments See Also Examples

View source: R/mantaFind.R

Description

Search for object or directory names with regular expressions (using R grep). Sort listings by filename, time, or size. Report entries within a time window. Report disk size, number of objects, number of subdirectories.

Usage

1
2
3
4
mantaFind(mantapath, grepfor, entries, l = "paths", items = "o",
  level = 0, sortby = "none", starttime, endtime, decreasing = FALSE,
  ignore.case = FALSE, perl = FALSE, verbose = FALSE, info = TRUE,
  findroot = 1)

Arguments

mantapath

character, optional. Current subdirectory set by mantaSetwd is used, otherwise specify full Manta path to subdirectory. Supports ~~ expansion to your Manta username, e.g. "~~/public" and UTF-8 encoded characters.

grepfor

character optional. Regular expression for grep name search. Ignored for reprocessed trees. Uses R regexps, N.B. use "[.]txt", not "*.txt" to match filename extensions.

entries

optional. Saved mantaFind R data. For reprocessing/reformatting retrieved R tree information saved with mantaFind(l='R')->tree.

l

character optional.
Specifies listing output format by 'paths', 'n', 'du', 'R'.
'paths' is a listing of full Manta object pathnames needed for mantaJobs.
'l' is a Unix-y listing style with full pathnames.
'sizes' is a listing of sizes in bytes, no pathnames.
'size_path' is a listing of size [space] path.
'URL' is a listing of the URLs (only for objects in ~~/public/).
'n' is the number of entries found.
'du' is the number of bytes used by objects (not counting redundancy levels!).
'R' is the R object collected by mantaFind with mtime parsed, full path names. mantaFind(l='R') -> tree saves the directory tree for reprocessing with mantaFind(mantapath, entries = tree, ...).

items

character optional. 'a' for all, 'd' for directory, 'o' for object.

level

integer optional. Maximum number of subdirectory child levels to visit, in other words, the depth of the hierarchical directory search. If level <= 0, search depth is unrestricted. Level parameter is ignored on reprocessed search trees.

sortby

character, optional. Specify 'none', 'name', 'time', or 'size'. Sorting selection is independent of time-bounded find.

starttime

POSIXlt time, optional. Start time for time-bounded find. When used without endtime, endtime is set to current UTC time.

endtime

POSIXlt time, optional. End time for time-bounded find. When used without starttime, starttime is set to start of Manta service

decreasing

logical, optional. Argument passed to R order for sorting.

ignore.case

logical, optional. Argument passed to R grep for searching.

perl

logical, optional. Argument passed to R grep for searching.

verbose

logical, optional. Verbose RCurl HTTP data output on Unix.

info

logical, optional. Console status messages about child path progress.

findroot

integer, internal. Indicates nested calls, not to be used.

See Also

mantaLs, mantaLs.paths, mantaLs.l, mantaLs.n, mantaLs.du, mantaLs.url

Other mantaFind: mantaFind.du; mantaFind.l; mantaFind.n; mantaFind.sizepath; mantaFind.sizes; mantaFind.url

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
## Find all objects stored in the directory tree starting
## at subdirectory specified by mantaSetwd(),
## return full Manta path to each object:
mantaFind()

## Find all objects ending in .jpg or .JPG
## in your Manta ~~/public directory and any child sub directories,
## (but not grandchildren), show a UNIX-like result sorted by file size:
mantaFind("~~/public", l = 'l', items = 'o', grepfor = "[.]jpg",
level = 2, ignore.case = TRUE, sortby = 'size')

## Download all objects in current Manta directory, non recursive find:
mantaGet(mantaFind(level = 1))

## Plot a histogram of all file sizes in your Manta  ~~/stor directory tree.
hist(mantaFind("~~/stor", l = 'sizes'))

## End(Not run)

joyent/mantaRSDK documentation built on May 19, 2019, 10:43 p.m.