You are not logged in.

1

Sunday, October 19th 2003, 7:24pm

Linux Command Problems & Questions

:shock: I am quite new to Linux and have a few questions.

1. What does it mean really, that X does not have to display the graphics with the characteristics the klient wants,
but only has to treat it as if it had those chracteristics?

2. When I use ls -1 the system reports 8 files and shows 2, but when I use -al the system reports 132 files and
shows 42 (including dot-files). Why does it only report a total of 8 files if there is 132, and why, when using -al,
does it only show 42 files, when it should show all?

3. When reading about Linux you are told that when using ls -al Linux will not give the size of the directory,
but rather the size of its control file or such. What does it mean?

4. When I wrote popd I accidentally used a '- sign and all of a sudden the prompt wouldn't let me put in commands.
My user name and location ([...]$) disappeared and was replaced with a >-sign. When I got out of it the prompt
listed all the commands saying 'command not found'. What happened?

5. Many questions...soon to be done.

6. Why does Linux report so many directories (what seems lik the hole /) when I'm trying to look for a directory
with find, before printing it at the end, and also all of its contents, or or when there just isn't any hits?
And why do I get a find error message saying the directory or file doesn´t exist, when it has actually found
it for me already?

7. When I use locate on 'time', why does it list all those files and directories that doesn't even have 'time'
in their names?

8. Why doesn't always grip provide all the hits to a given search pattern?

9. Why is it that find won't provide anything, not even an error message when i ommit the '.???' in the filename,
but locate finds it in a snap?

Thanks for your patience and time. There is only one question left and that is: How do I know wich
version of KDE I'm using and can I choose to upgrade just KDE, Linux or X or other instead of installing
a whole new package?

Now I'm finished and I can tell it was good!!!! Anyone reading this far... don't feel obliged to
answer all questions. I'm happy if you could answer just one or two.

Thanks and Have a good day.

Tillus

2

Sunday, October 19th 2003, 10:28pm

Re: Linux Command Problems & Questions

Quoted

Original von Tillus

1. What does it mean really, that X does not have to display the graphics with the characteristics the klient wants,
but only has to treat it as if it had those chracteristics?

Sorry, I didn't understand that question

Quoted

Original von Tillus

2. When I use ls -1 the system reports 8 files and shows 2, but when I use -al the system reports 132 files and
shows 42 (including dot-files). Why does it only report a total of 8 files if there is 132, and why, when using -al,
does it only show 42 files, when it should show all?

I'm not exactly sure what you mean by "reporting" and "showing",
maybe you can paste an example of the command and its
output...


Quoted

Original von Tillus

3. When reading about Linux you are told that when using ls -al Linux will not give the size of the directory,
but rather the size of its control file or such. What does it mean?

I guess that means that it doesn't give you the summed up size
of the files contained in the directory but the size needed by the
directory to keep track of its entries.


Quoted

Original von Tillus

4. When I wrote popd I accidentally used a '- sign and all of a sudden the prompt wouldn't let me put in commands.
My user name and location ([...]$) disappeared and was replaced with a >-sign. When I got out of it the prompt
listed all the commands saying 'command not found'. What happened?

You were inside a quoted string. The command didn't get executed
before you typed another quote. Not even hitting Enter would break it.
You got the continuation prompt ">" instead, telling you
that the previous input line wasn't complete yet.
Everything you had typed was then interpreted as a single
command that could not be found by the system, of course,
because there is not command called
popd'
ls
ls
quit'
;-)


Quoted

Original von Tillus

5. Many questions...soon to be done.


Let me rest for a minute...

3

Sunday, October 19th 2003, 10:47pm

Re: Linux Command Problems & Questions

Quoted

Original von Tillus

6. Why does Linux report so many directories (what seems lik the hole /) when I'm trying to look for a directory
with find, before printing it at the end, and also all of its contents, or or when there just isn't any hits?
And why do I get a find error message saying the directory or file doesn´t exist, when it has actually found
it for me already?

What exactly did you type and what directory have you given as starting point?
find descends into directories and lists all files and directories therein
that match the conditions you've given. If you didn't impose any
restrictions then all files and directories are listed...


Quoted

Original von Tillus

7. When I use locate on 'time', why does it list all those files and directories that doesn't even have 'time'
in their names?

Try again and check if the string "time" appears somewhere
in the directory name then. I'm pretty sure it does...


Quoted

Original von Tillus

8. Why doesn't always grip provide all the hits to a given search pattern?

I assume you mean "grep". Again, an example of a command line
and the output that puzzles you would help.


Quoted

Original von Tillus

9. Why is it that find won't provide anything, not even an error message when i ommit the '.???' in the filename,
but locate finds it in a snap?

Well, they are different commands and different rules apply.
locate does a substring search on the complete path
(see question 7) while find searches for a complete
match in the filename.


Quoted

Original von Tillus

Thanks for your patience and time. There is only one question left and that is: How do I know wich
version of KDE I'm using and can I choose to upgrade just KDE, Linux or X or other instead of installing
a whole new package?

Open the control center, e.g. by typing kcontrol on the command line.
The version info is directly in the info window on the right.

You can update KDE, X and the Linux kernel pretty much independently
from each other, and if you can't the dependency system
of your distribution should tell you about this, for example
by suggesting an update of other needed packages.
(Unless you're compiling everything from source yourself
which I wouldn't recommend for a beginner.)

4

Monday, October 20th 2003, 1:24am

For the KDE version, use "Help"/"About KDE".

Have a nice day!

5

Monday, October 20th 2003, 1:57am

1: sorry I do not understand the question.

2: Here too, sorry I do not understand. What do you mean by the "system reports". As far as I know ls -1 do not show the number of files that it has displayed. (ls -al does however.)

3,4,5: were answered by the previous poster. :)

6: find typed alone try to display all files and directories in the current directory and below.

Locate is something else. Locate works from a database, build by an automated script. Locate is faster but its database has not all the file of the system for security reasons. (A user could know of a file that he has no right to know that it exist.) Locate try only to match partial paterns (but knows some wildcard too.)

7: cannot reproduce. Sure, you get something like kmultimedia, but it does contain the sequence time too.

8: grep uses by default what is called regular expressions. For example:
grep "end$" yourfile.txt
will find the sequence end at the end of a line (and not any end$ .)

9: Do you mean 8 times ? Well that means exactly eight characters (this is Bash, not MS-DOS's command line) so if you have no directory with exactly eight character, find finds nothing. It does not give any error message, because the biggest use of those little programs are scripts.
Ooh, yes, I have written directory, because find awaits a directory name as first parameter.

Locate simply search a file or directory with at least eight characters. So probably you have many files like that.

Any file in Bash is done by * , like for example:
echo *

:arrow: In general: please see the man files of the programs, for example:
man find
or the info files:
info find
(You quit man or info with q .)

Have a nice day!