On Thu, Mar 20, 2014 at 3:02 AM, Harry Putnam <[email protected]> wrote:
> Probably some obvious thing going on here but I'm not see how find all > '.zfs' directories under a zfs system hierarchy. > That's really the same as the list of filesystems, so zfs list -t filesystem -r tank/foo > Just running something like > > cd /rmh/ (that is 'p2/rmh' in zpool talk) > > find . -type d -name 'snapshot' > That's a really bad idea. What if there are a billion files under there, could take a while. That sort of logic also gets easily confused by anybody who can create directory names that match your pattern. > No hits whatsoever, when I know there are 4-5 under there. > > I wanted to setup some homeboy snapshot destroys on the basis of mving > to all .zfs/snapshot directories and using ls -t, sed, zfs snapshot > destroy to > get rid of snaps beyond the most recent 8 in the directory > > So is something like 'zfs -H -t snapshot -o name' the only way to > ferret out actual addresses of the snaps? > > I'd sooner use basic oldschool unix tools if possible > The zfs command exists and provides its output for a reason - it's the most efficient and reliable source of that information, so best take advantage of it. -- -Peter Tribble http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/ _______________________________________________ OpenIndiana-discuss mailing list [email protected] http://openindiana.org/mailman/listinfo/openindiana-discuss
