-2

from ZFS Array cli how to get the latest snapshot for share.

my share name is "test_share" for this share want to check the latest snapshot.

Test-ae0101zfs201:shares test_proj_test/test_share_test snapshots>

sssss
  • 1
  • 2

1 Answers1

2

I'm not totally sure what you're asking or the full context, but zfs list -t snap shows snapshots. They're listed in chronological order, so you can use tail to get the latest one.

zfs list -t snap | grep test_proj/test_share | tail -1

ewwhite
  • 197,159
  • 92
  • 443
  • 809
  • Thanks for replay, command which you have given we need to run from shell prompt. But i am looking the latest snapshot list without entering into shell prompt. ex: once we login into the ZFS Array cli it will be in -- "test-zs0101zfs01>" this prompt right want to get the latest snapshot details for share from here. – sssss Aug 29 '20 at 15:48
  • Actually i am looking script for - take snapshot for multiple shares and create clone with the latest snapshot. if you have any script or commands for this it would be helpful for me. – sssss Aug 29 '20 at 15:53
  • I don't think I can help you. – ewwhite Aug 29 '20 at 15:57
  • do you have any script to take snapshot for multiple shares and create clone with latest snapshot. if you have any it will help full for me. – sssss Aug 29 '20 at 15:59