Hello Zak, On Wed, Aug 4, 2010 at 9:12 AM, Zak B. Elep <zak...@gmail.com> wrote: > On Wed, Aug 4, 2010 at 8:24 AM, Marvin Pascual <bin...@gmail.com> wrote: >> Hello all, >> >> How can I check if a block device (partition) has one or any or all of >> the following characteristics: >> >> [1] raw >> >> [2] has content >> >> [3] formatted >> >> but without actually mounting it? > > testdisk?
I can use a similar command below to check whether the partition is formatted or not: testdisk /list $BLOCK_DEVICE | tail -n 1 | grep -i Partition If there will be an output to the above command, that only shows that the block device is not formatted. Thank you, Zak! ;-) Now, whether or not the block device contains already any file(s) or directory(ies) other than the lost+found directory for the ext2/3/4 filesystem. Regards, Marvin _________________________________________________ Philippine Linux Users' Group (PLUG) Mailing List http://lists.linux.org.ph/mailman/listinfo/plug Searchable Archives: http://archives.free.net.ph