Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

From the command line, I want to do cat on a txt file on a different partition, how can I do that?

I mount the drive manually and from the command line, I type: (this case, abc.txt in f drive)

cat ~/media/f/abc.txt

But it says no such file or directory exists.

Please help, thanks!

share|improve this question

migrated from Nov 26 '11 at 8:34

This question came from our site for professional and enthusiast programmers.

Remove the ~ and try again ;) – Polynomial Nov 2 '11 at 7:13
How exactly do you mount your drive? Could you please post your mounting command? What is an output of 'mount -l' command after you've done your mount operation? – Mark Bramnik Nov 2 '11 at 7:14
~ points to your local user directory, is it really the case? – Mark Bramnik Nov 2 '11 at 7:15
I did not mount the drive in command line, I did in the graphical UI, sorry – JJ Liu Nov 2 '11 at 7:54
up vote 5 down vote accepted

When you're writing cat ~/media/f/abc.txt, you are referringn to a directory called media inside your home folder. Are you sure you mounted it there, and not in /media ? Try this:

cat /media/f/abc.txt
share|improve this answer
thanks for your help, it works. – JJ Liu Nov 2 '11 at 7:55

Your Answer


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