LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Go to /dev/sda1 in commnd line? (https://www.linuxquestions.org/questions/linux-newbie-8/go-to-dev-sda1-in-commnd-line-674189/)

liquidcourage1 10-04-2008 09:30 AM

Go to /dev/sda1 in commnd line?
 
I'm extremely new to linux. One of our servers has a USB drive mounted and is almost full.

How do I navigate to the drive? I know how to list the drives (df -h) and move through most directories (cd), but I don't know how to get to this drive to figure out which files are consuming all the space.

And yes, I did try a search, but my terms didn't find anything.

Any help would be greatly appreciated.

{BBI}Nexus{BBI} 10-04-2008 09:50 AM

Quote:

Originally Posted by liquidcourage1 (Post 3300046)
I'm extremely new to linux. One of our servers has a USB drive mounted and is almost full.

How do I navigate to the drive? I know how to list the drives (df -h) and move through most directories (cd), but I don't know how to get to this drive to figure out which files are consuming all the space.

And yes, I did try a search, but my terms didn't find anything. <-- What nothing at all!!?

Any help would be greatly appreciated.

Anyway to answer your question. Type
Code:

mount
this will show the directory where your /dev/sda(x) is mounted. Now cd to the mount point i.e.
Code:

cd /<insert mount point here>

rabbit2345 10-04-2008 09:58 AM

ok, so run the mount command first, and find where your USB drive is mounted. the you can run:

cd <mount point of usb>

and that gets you to your usb drive.

but if you want to find big files, then you can run:

Code:

find <usb mountpoint> -size +100M
-replace <usb mountpoint> with your actual mount point. it might be /mnt/sda1 or /media/sda1, something like that

this command will find any file larger than 100 MB



good luck,
rabbit2345 ^_^


All times are GMT -5. The time now is 01:57 AM.