Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a lot of filesystems:

  • / on a PCI-E SSD
  • swap on a SATA SSD
  • /media/ned is a RAID5 array
  • /tmp lives on RAM
  • Parts of /home/oli are symlinked and bind-mounted in from ned
  • I also have /media/jeff/ which is RAID1 that I store backups and bind-mount ~/.wine in off.

It's actually a lot more complicated than that. There are all sorts of extra symlinks that I need to untangle in the long run but for now I just need a nice way of taking a path and finding out where it physically lives.

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

This is not probably the best or the correct answer, but df can do it:

javier@todocolor:~$ df /boot/grub/
S.ficheros         Bloques de 1K   Usado    Dispon Uso% Montado en
/dev/sda2               918354    184202    685154  22% /boot
javier@todocolor:~$ df .
S.ficheros         Bloques de 1K   Usado    Dispon Uso% Montado en
/dev/md0              75532064  13930424  57795044  20% /

Take the first and the last column.

share|improve this answer
add comment
df /path/to/filename    # to find out what device a file or folder is on
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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