Kommandon i Mandrake
Har precis börjat att bekanta mig med linux och skall utföra olika kommandon men får fan inte rätt på det...
Hade behövt få hjälp med följande som jag fastnat på och inte hittar i böcker:
No. 2:
====
Use the touch-command and create several files in a sub-directory of the
directory testdir (that you recently created). Name the directory book and
create the files ch01, ch02, ch03......ch14, i.e. fourteen files. Write down
the commands to reach following result:
a) Use the ls-command and list the access rights for the files ch10, ch11,
ch12, ch13 and ch14.
ANSWER:
b) Use the ls-command once and list the access rights for the files ch03
and ch12.
ANSWER:
c) Combine the files ch01, ch02 and ch03 to one new file called ch01a
ANSWER:
d) Delete the files ch01, ch02 and ch03 in one operation
ANSWER:
No. 3:
====
Create more files in the directory book from the previous task. Use the
filenames ch01a, ch02a, 00copy and 01copy. Write down the commands
to reach following result:
a) Use the ls-command and list the names of all files that have one or
digits in the beginning of the filename.
ANSWER:
b) List also the name of the files that has digits somewhere in the filename
ANSWER:
No. 4:
====
a) Create a copy of the whole directory tree testdir. Call the new directory
for testdir0. Use the manpage to find the options you need for this operation.
(Hint: The word recursive means that all sub.directories are traversed)
ANSWER:
b) Delete the directory testdir0 in one operation without any questions from
the shell. What command did you use, and what options?
ANSWER:
No. 5:
====
The manpages gives you help about everything in Linux, for example
man cp gives help about the cp-command, man bash about the Bash
command shell and man man about the man-system itself.
When you lists a manpage you can get help about the use of the system
by pressing the h-key. Find out how you can search for given words in the
manpage and how you can proceed to the next instance of the word.
ANSWER:
No. 6:
====
In you home directory you have the files chX.txt, ch01.txt, ch13.txt, chB.txt
and chA.bak. How can you list the content of all these files with one
command, i.e. one command line?
ANSWER:
[size="1"]Signatur raderad, max tre rader i size 1. Se reglerna. - Vicotnik[/size]