summaryrefslogtreecommitdiffstats
path: root/extras/geo-rep/get-gfid.sh
blob: a4d609b0bc5c9ef8857f2f29757122e270bbc430 (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"