LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-12-2017, 01:10 AM   #1
Family
LQ Newbie
 
Registered: Dec 2017
Posts: 2

Rep: Reputation: Disabled
Terminal command nor responding to CAT command


Okay Here I go. I'm new to Linux. I installed a OS on my lap top and a VMware Virtualization copy on my desk top. When I use the CAT command from the terminal I get the message: No such file or directory. I have a file on my desktop named story that I want to read. At my prompt I typed cat desktop/story. this should display the content of story. But instead it gives the message: (No such file or directory). It does the same on both the OS(desktop) and Desktop (virtualization)

Thanks
Family
 
Old 12-12-2017, 01:25 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
linux/unix is case sensitive, so probably you need to type DESKTOP instead of desktop.
Furthermore you need to learn about the directory structure on linux to be able to find a directory (like DESKTOP in your case) or a file (like story).
Whay kind of OS did you install?
 
Old 12-12-2017, 01:29 AM   #3
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,574
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
It would help if you told us which of the many Linux desktops you are using (or if you don't know, at least the name of your distribution) because different desktops handle their shortcuts in different ways. But usually the desktop directory is called Desktop, not desktop. Linux is case-sensitive.

@Pan64: I don't think it's likely to be DESKTOP. I've never seen a directory with a name like that.

Last edited by hazel; 12-12-2017 at 01:30 AM.
 
1 members found this post helpful.
Old 12-12-2017, 01:36 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
Quote:
Originally Posted by hazel View Post
@Pan64: I don't think it's likely to be DESKTOP. I've never seen a directory with a name like that.
So probably Desktop. at least on my ubuntu (and in general, using Gnome).
 
1 members found this post helpful.
Old 12-12-2017, 03:17 AM   #5
rhubarbdog
Member
 
Registered: Apr 2015
Location: Yorkshire, England
Distribution: Linux Mint
Posts: 145

Rep: Reputation: Disabled
Code:
cat ~/Desktop/my-file
Just change my-file to actual file name
 
1 members found this post helpful.
Old 12-12-2017, 04:33 AM   #6
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,493

Rep: Reputation: Disabled
Might also be better to use less rather than cat, in case it is more than a screenful of text.
 
Old 12-12-2017, 10:54 AM   #7
Family
LQ Newbie
 
Registered: Dec 2017
Posts: 2

Original Poster
Rep: Reputation: Disabled
Pboblem solved

The problem was as stated. I just needed to Cap the (D). Use Desktop instead of desktop.

Thank you guys for helping me with this problem!!

Family
 
Old 12-12-2017, 11:22 AM   #8
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,574
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
OK, mark it as solved. Then if anyone else has the same problem, your thread will jump out at him.
 
Old 12-12-2017, 11:36 AM   #9
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
Yes, please mark it as solved. Probably offtopic, but I have an additonal remark:
Quote:
Terminal command nor responding to CAT command
Is not really correct: the terminal did respond (definitely), but the response was not what you want. Next time (and in general) please try to understand that message (this time: No such file or directory). Actually this was the correct response to the command you entered.
 
Old 12-12-2017, 11:56 AM   #10
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,574
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
Quote:
Originally Posted by pan64 View Post
the terminal did respond (definitely), but the response was not what you want. Next time (and in general) please try to understand that message (this time: No such file or directory). Actually this was the correct response to the command you entered.
That's quite a difficult concept for a newbie to understand. Because Windows error messages are usually not very informative, users get accustomed to the idea that an error message simply means that something or other went wrong.

@Family. Linux error messages are usually very informative indeed, so it is worth reading the message carefully. In most cases it will tell you exactly what you did wrong; some error messages even tell you what to do to put it right. In this case, the message made it clear that it was either the filename or the directory name that did not correspond to anything the cat command could find. That usually means the name was wrongly spelled.

If the command had been wrong, it would have said "cat: command not found".

Last edited by hazel; 12-12-2017 at 11:57 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help using cat command. stevenjeffries Linux - Newbie 2 09-29-2014 05:19 PM
cat command -s , -n doug skillmore Linux - Newbie 2 02-27-2013 04:52 PM
Is command line invocation of gnome-terminal to run more than one command possible? narnie Programming 4 02-17-2010 10:39 PM
[SOLVED] append command output to file by giving command in terminal sumeet inani Linux - Newbie 4 07-03-2009 10:36 AM
cat Command Moeses Linux - General 1 06-20-2002 03:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration