Originally Posted by _Linux_Learner
Let me be more descriptive. Suppose I am working in Desktop directory. Now I want to now that what is the uuid of the partition on which this Desktop directory is present.
blkid will print all the uuids which will force me to select the correct one that I need.
Not sure I understand your questions, but blkid doesn't make you "choose" anything, it just prints the UUIDs of every partition. I don't know why that is a big deal, but if you only want to print the UUID for a specific partition, you can use the command "blkid | grep sdaX" (or hda, or what type of partition you have". There is no tool that will tell you the partition a particular directory is on, and give you the UUID of that partition.
Is it that you don't know how you hard drive is partitioned? If this is the case you can use the "df" command, normally used to determine disk usage, to print a list of your partitions, and what parent directories are mounted on them. The only thing that this command won't print is swap partitions, but you can determine this by process of elimination.