Ubuntu 10.10 terminal does not recognize cat or rm

Asked by Elbi Zioncheck

I am brand new to Ubuntu. Using the book "A Practical Guide to Ubuntu Linux by Mark Sobell", I had trouble with Ubuntu version 10.04. It would not run correctly on my system. So I was advised to try a later version. So I installed Ubuntu version 10.10. I ran the update manger to make sure I was running the latest update of that version.

In working my way through the book "A Practical Guide to Ubuntu Linux by Mark Sobell", I am diligently doing the exercises that he poses. On page 161, he says, "Using the editor of your choice, create a small file named 'practice'. " I created the file using gedit. Then he gives the commands to try.

$ ls
$ cat practice
$ rm practice

The ls command displays the list of files, folders, etc in my home directory. Ls does in fact see the little file "practice."

But the cat command displays "cat: practice: no such file or directory" and the rm command displays "rm: cannot remove 'practice': no such file or directory."

Was there some configuration that needed to be done that I am not aware of and the book forgot to mention? Is the version I am working with corrupted? I am trying to learn Ubuntu and yet I am having to troubleshoot the problems without any knowledge of the OS. Can someone help me, please? Thank for any assistance. Elbi

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gnome-terminal Edit question
Assignee:
No assignee Edit question
Solved by:
enubuntu
Solved:
Last query:
Last reply:
Revision history for this message
enubuntu (mr.tennents) said :
#1

After the cat command (rm too) you have to specify a file or directory that exist. The error "cat: practice: no such file or directory" is why the file practice dont't exist. Probably you have created it on your Desktop, and the terminal for default is opned up in your home directory. So please try to create the file 'pratcice' in your home folder and try again.

Revision history for this message
Ubfan (ubfan1) said :
#2

Your file probably has a space at the end of its name, so without the space, the cat and rm don't work. Creating files with a gui make putting spaces into names far too easy, since from the command line, that would need explicit quotes.

Revision history for this message
Elbi Zioncheck (ezioncheck) said :
#3

I tried to recreate the simple text file while in my home directory (/home/elbi).

I made sure that there were no spaces at the end of the name.

I can see the file in the home directory; it is 56 bytes in size. It is not on my desktop. I used properties to verify the file name, and location.

 But I still get the same error messages with cat and rm.

Any other ideas?

Revision history for this message
Best enubuntu (mr.tennents) said :
#4

Please do this:
1. Create the file on /home/elbi with gedit and call it test.txt (You can also write something in gedit to see how cat works)
2. Open a terminal by hitting CTRL + ALT + T and insert this for move the terminal to your home:
cd /home/elbi

3. Now there is a file on /home/elbi/test.txt so try to see it with this command:
cat test.txt

If this not work, try to run this command:
cat /home/elbi/test.txt

4. Do the same for rm:
rm test.txt

or

rm /home/elbi/test.txt

Revision history for this message
Elbi Zioncheck (ezioncheck) said :
#5

I thank you for your help, but I didn't need to go that far. When I said I was new to Ubuntu Linux, I meant really new -

I had created the file using "gedit" in my home directory and saved it as "Practice". Note the Uppercase of the P.

When I used the command "ls", of course it listed all the files in my home directory.

When I used the "cat" command, I had typed: "$ cat practice" (all lower case); same with the rm command.

When I started to follow your instructions, that you so kindly provided, was when I realized that Linux is case-sensitive, whereas Windows not so (except for passwords.)

When I typed the command: "$ cat Practice"; it worked. I must remember Linux is case-sensitive.

Thank you again for your help to this novice.