1

I am using a cloud linux desktop and when I typed in df -h I get a list of filesystems as so:

Filesystem            Size  Used Avail Use% Mounted on
/dev/xvda1            9.8G  4.5G  5.3G  47% /
tmpfs                  61G     0   61G   0% /dev/shm
/dev/xvdb             296G   27G  254G  10% /local

I want to go to /dev/xvdb since it has the largest diskspace. I tried to cd into it but that did not work. How do I get cd into it when I do not know where it is?

I tried to cd /dev/xvdb and this was the result:

cd /dev/xvdb
cd: not a directory: /dev/xvdb

Following the answer below this is what I have

(20-10-12 18:23:27) <0> [/local]  
dev-dsk % cd /dev/xvdb
cd: not a directory: /dev/xvdb
6
  • 2
    The Mounted on column tells you where it is: /local. So cd /local – steeldriver Oct 12 '20 at 17:54
  • How didn't it work? – Arkadiusz Drabczyk Oct 12 '20 at 18:02
  • @steeldriver I noticed that it could be in local but its a bit hard to find. Any idea on how to find the path? – Wolfy Oct 12 '20 at 18:03
  • @ArkadiuszDrabczyk When I try to cd into that filesystem it states that it does not exist. – Wolfy Oct 12 '20 at 18:05
  • Did you do cd /dev/xvdb? Post the entire command you used and output you got. – Arkadiusz Drabczyk Oct 12 '20 at 18:05
4

Your command is incorrect - /dev/xvdb is not a directory on the filesystem of the device, it's the device itself whose filesystem is Mounted on /local directory as shown in output of df -h. In other words, /local is a mountpoint for /dev/xvdb device. To navigate to the filesystem stored on /dev/xvdb you need to go to its mountpoint:

cd /local
4
  • I made a comment following your answer. Still getting the same error. – Wolfy Oct 12 '20 at 18:24
  • As I said - cd /dev/xvdb is wrong, you have to do cd /local as explained. – Arkadiusz Drabczyk Oct 12 '20 at 18:26
  • I see, so I just need to cd into local? – Wolfy Oct 12 '20 at 18:33
  • 1
    Yes - you really need to do cd /local – Arkadiusz Drabczyk Oct 12 '20 at 18:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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