The debugfs manpage gives the impression that the command 'rdump . .' will recursively copy all files found on the specified filesystem from the debugfs cwd to the native filesystem's cwd. Instead I seem to receive a syntax error, and no copy is initiated?

These are the commands I run:

cd /path/to/transfer/destination
debugfs /dev/sda1 -R rdump . .

My task is to copy the entire contents of a clean yet unmountable USB storage device to its host machine's HD. The host machine does not support the inode size used by the USB device's filesystem (256) and its software is not upgradeable, so my intention was to use debugfs to transfer the files. If anyone has any other suggestions for this task I'd be grateful.


2 Answers 2


I don't see the reference to current working directory in the man page for the version I have. The cwd (pwd) is significant in the shell and has no meaning to a device (unlike Windows where each drive has a cwd). I would recommend trying to completely specify both the source and destination directories. Why not use tar or dd or rsync?

  • I assumed the "." would be effective since "ls -l" within debugfs gives me a file listing including "." and ".." , both of which return the device's root directory contents if used in conjunction with ls. I can specify each directory in the device's root explicitly and it copies all content recursively, but I was hoping to come up with a solution that requires less input. I couldn't find any documentation on using tar, dd or rsync for the purpose of my task? Thanks for the reply!
    – tjbp
    Jun 18, 2010 at 8:35
  • dd is the way to go if you cannot mount the partition first.
    – Warner
    Jun 18, 2010 at 13:22

How about this?

debugfs /dev/sda1 -R "rdump / /path/to/transfer/destination"

I haven't tested that, as I don't have something to test it on, but TFM seems to imply this is more correct. Actually, you might want to swap arguments around to better match what the man page suggests:

debugfs -R "rdump / /path/to/transfer/destination" /dev/sda1

I don't know if that matters, but it could.

  • Quoting ram.kossboss.com/… "If your wondering is there a way to do “ rdump / . ” The answer is no. Thats a lack of the program, so you have to rdump every folder and file on the root one by one as already explained above"
    – user47584
    Dec 21, 2015 at 16:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.