Here's the script I wrote:

########################
#!/bin/bash

#=======================================================================#
# Configuration                                                         #
#=======================================================================#

# Object root directory, as defined in fedora.fcfg
objroot='/path/to/fedora/object/root/directory'

# The awk print string matches the directory pattern defined in
# akubra-llstore.xml
awkcmd='{ print substr($0,1,1) "/" substr($0,2,2) "/" substr($0,4,2); }'

#=======================================================================#
# Main                                                                  #
#=======================================================================#

if [ "X$1" == "X" ]
then
     echo "Usage:  $0 <fedora_object_pid>" 1>&2
     exit 1
fi

pid="$1"

path=`echo -n "info:fedora/$pid" | md5sum | awk "$awkcmd"`

fmtpid=`echo -n "info:fedora/$pid" | sed 's/:/%3A/g' | sed 's#/#%2F#g'`

ls -l "$objroot/$path/$fmtpid"

exit
################################

-- Scott

On 06/01/2012 10:10 AM, Matteo Boschini wrote:
> On Fri, Jun 1, 2012 at 5:02 PM, Scott Prater<pra...@wisc.edu>  wrote:
>> Not that I'm aware of, since the point of Akubra is to hide the underlying 
>> storage implementation from Fedora.
>
> that was exactly my point to the person(s) who asked me...
>
>>
>> I did write a little script to hash the object and datastream IDs using the 
>> same algorithm Akubra uses, and return the path to the objects on the 
>> filesystem, as a utility tool for myself. I can see if I can dig that up and 
>> pass it along, if you're interested.
>
> that might be great !


-- 
Scott Prater
Shared Development Group
General Library System
University of Wisconsin - Madison
pra...@wisc.edu
5-5415

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Fedora-commons-users mailing list
Fedora-commons-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Reply via email to