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? |
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 |
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 ~$ 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. |
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:
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". |
All times are GMT -5. The time now is 05:15 AM. |