summaryrefslogtreecommitdiffstats
path: root/extras/geo-rep/get-gfid.sh
blob: e63057db3d2ce9a39d8cb8492ec46501a5d825d1 (plain)
1
2
3
4
5
6
7
#!/bin/bash

ATTR_STR=`getfattr -h $1 -n glusterfs.gfid.string`
GLFS_PATH=`echo $ATTR_STR | sed -e 's/# file: \(.*\) glusterfs.gfid.string.*/\1/g'`
GFID=`echo $ATTR_STR | sed -e 's/.*glusterfs.gfid.string="\(.*\)"/\1/g'`

echo "$GFID $GLFS_PATH"