LinuxQuestions.org
Review your favorite Linux distribution.
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 11-30-2007, 07:44 AM   #1
r00ster
Member
 
Registered: May 2007
Location: boundary beach, bc
Distribution: 3.2.0-4-686-pae #1 SMP Debian 3.2.60-1+deb7u3 i686 GNU/Linux
Posts: 224

Rep: Reputation: 15
Using Console Debian/Etch/KDE


I need a clue.

I'm trying to teach myself how to navigate/explore the KDE filesystem.

In my home/me/ directory, I have some mozilla files I would like to look at in shell. When I "ls -a" in my home directory, the file I want is listed: "morecols-0.3.5.1.xpi".

But when I try to access/expand it, I get:
~$ /morecols-0.3.5.1.xpi
bash: /morecols-0.3.5.1.xpi: No such file or directory
~$ morecols-0.3.5.1.xpi
bash: rooster@royrogers:~$: command not found
~$ morecols-0.3.5.1.xpi

So what's the trick?
 
Old 11-30-2007, 08:04 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
To read a file:

"cat filename" or "more filename" (without the quotes)

To RUN (execute) a file:
If the directory is in $PATH: "filename"
If not, then "/dir/dir/filename" or "./filename" in the same directory**

"/xxxx" tries to execute a file named xxxx at the root (/) level

** "." = this directory---where we are
".." = one directory up
 
Old 11-30-2007, 09:01 AM   #3
r00ster
Member
 
Registered: May 2007
Location: boundary beach, bc
Distribution: 3.2.0-4-686-pae #1 SMP Debian 3.2.60-1+deb7u3 i686 GNU/Linux
Posts: 224

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by pixellany View Post
To read a file:

"cat filename" or "more filename" (without the quotes)

To RUN (execute) a file:
If the directory is in $PATH: "filename"
If not, then "/dir/dir/filename" or "./filename" in the same directory**

"/xxxx" tries to execute a file named xxxx at the root (/) level

** "." = this directory---where we are
".." = one directory up
pixellany;

~$ cat: /morecols-0.3.5.1.xpi: No such file or directory
bash: cat:: command not found
~$ cat .morecols-0.3.5.1.xpi
cat: .morecols-0.3.5.1.xpi: No such file or directory

~$ more .morecols-0.3.5.1.xpi
.morecols-0.3.5.1.xpi: No such file or directory
~$ more /morecols-0.3.5.1.xpi
/morecols-0.3.5.1.xpi: No such file or directory

I feel not unlike a fool, but you see my problem.
 
Old 11-30-2007, 09:30 AM   #4
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 55
The syntax is:

PATH/FILENAME
or directly
FILENAME

PATH can be /aa , . , /aa/bb etc..
/aa means directory aa starting from / (see / as the root of a tree). aa is a direct leaf of the root.
/aa/bb means go in the directory aa under / and then again in bb

. is a synonym for the current directory
.. is a synonym for the parent directory ( /aa/.. is equivalent to /)

In case "PATH/" is not present, it is equivalent to
./FILENAME


Quote:
~$ cat: /morecols-0.3.5.1.xpi: No such file or directory
bash: cat:: command not found
~$ cat .morecols-0.3.5.1.xpi
cat: .morecols-0.3.5.1.xpi: No such file or directory
First command: /moreblabla defines a file which has PATH= / , name =moreblabla.
It means the file has to be at the root of the disk but I guess it's in your directory.
Second command
You forgot the / : .moreblabl is a file in the current directory with name .moreblabla. unfortunatly your file is moreblabla (without the dot)

So it's either
cat ./moreblabla
or
cat moreblabla


Your shell will execute the first argument. Above it was "cat" which displays the second argument (moreblabla)
If you want to execute a script, you then have to pass it as first argument.
./moreblabla
BUT in your case, morecols-0.3.5.1.xpi is not possible to be executed from command line, it's a "plugin" for firefox: the suffix is "xpi".
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
log in console mode in debian etch htamayo Linux - Newbie 2 04-11-2007 12:04 PM
KDE on Debian etch broken havok1977 Linux - Desktop 2 11-29-2006 01:18 PM
Debian Etch and KDE 3.5 slowness knowledgeispwr Debian 3 11-19-2006 12:03 PM
How to have a keyboard correctly mapped in gnome and in console mode (DEBIAN ETCH) baudouin Linux - Hardware 0 10-26-2006 10:21 AM
XGL on Debian Etch with KDE RodWC Debian 1 08-10-2006 02:27 PM


All times are GMT -5. The time now is 04:33 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration