All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: "chen.szu.fan" <chen.szu.fan@gmail.com>
Cc: linux-xfs@oss.sgi.com
Subject: Re: see the file content by xfs_db
Date: Thu, 16 May 2013 20:12:49 -0500	[thread overview]
Message-ID: <51958411.70008@sandeen.net> (raw)
In-Reply-To: <loom.20130516T084318-878@post.gmane.org>

On 5/16/13 1:48 AM, chen.szu.fan wrote:
> is it possible to see the file content by xfs_db? and how-to?

you can get the file mapping & dump file blocks one at a time, anyway:

[root@bp-05 ~]# mount /dev/sdb4 /mnt/test
[root@bp-05 ~]# echo "mydata" > /mnt/test/testfile
[root@bp-05 ~]# ls -i /mnt/test/testfile
53573991 /mnt/test/testfile
[root@bp-05 ~]# umount /dev/sdb4


[root@bp-05 ~]# xfs_db /dev/sdb4
xfs_db> inode 53573991
xfs_db> p u.bmx
u.bmx[0] = [startoff,startblock,blockcount,extentflag] 0:[0,3348403,1,0]
xfs_db> fsblock 3348403
xfs_db> type text
xfs_db> p
000:  6d 79 64 61 74 61 0a 00 00 00 00 00 00 00 00 00  mydata..........
010:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
<snip>

-Eric

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      reply	other threads:[~2013-05-17  1:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-16  6:48 see the file content by xfs_db chen.szu.fan
2013-05-17  1:12 ` Eric Sandeen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51958411.70008@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=chen.szu.fan@gmail.com \
    --cc=linux-xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.