Edited, memorised or added to reading queue

on 13-Aug-2019 (Tue)

Do you want BuboFlash to help you learning these things? Click here to log in or create user.

Flashcard 4335213088012

Question

What does the linux command below do ?

$whatis route

Answer

To see just the description of a manual page, use whatis followed by a string.

paul@u810:~$ whatis route
route (8) - show / manipulate the IP routing table

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
Chapter 7. man pages
ty (8) - Setup and remove LOCALx facility for sysklogd syslog.conf (5) - syslogd(8) configuration file syslogd (8) - Linux system logging utilities. syslogd-listfiles (8) - list system logfiles <span>whatis To see just the description of a manual page, use whatis followed by a string. paul@u810:~$ whatis route route (8) - show / manipulate the IP routing table whereis The location of a manpage can be revealed with whereis. paul@laika:~$ whereis -m whois whois: /usr/share/man/man1/whois.1.gz This file is directly readable by man. paul@laika:~$







Flashcard 4335215447308

Question

What does the command below do ?

$ whereis route

Answer

The location of a manpage can be revealed with whereis .

paul@laika:~$ whereis -m whois
whois: /usr/share/man/man1/whois.1.gz

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
Chapter 7. man pages
les (8) - list system logfiles whatis To see just the description of a manual page, use whatis followed by a string. paul@u810:~$ whatis route route (8) - show / manipulate the IP routing table <span>whereis The location of a manpage can be revealed with whereis. paul@laika:~$ whereis -m whois whois: /usr/share/man/man1/whois.1.gz This file is directly readable by man. paul@laika:~$ man /usr/share/man/man1/whois.1.gz man sections By now you will have noticed the numbers between the round brackets. man man will ex







Flashcard 4335217282316

Question

What does the linux command below do ?

$ man 5 passwd

Answer

man $section $file

Therefor, when referring to the man page of the passwd command, you will see it written as passwd(1) ; when referring to the passwd file , you will see it written as passwd(5) . The screenshot explains how to open the man page in the correct section.

[paul@RHEL52 ~]$ man passwd # opens the first manual found
[paul@RHEL52 ~]$ man 5 passwd # opens a page from section 5

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
Chapter 7. man pages
ventions eg /etc/passwd 6 Games 7 Miscellaneous (including macro packages and conventions), e.g. man(7) 8 System administration commands (usually only for root) 9 Kernel routines [Non standard] <span>man $section $file Therefor, when referring to the man page of the passwd command, you will see it written as passwd(1); when referring to the passwd file, you will see it written as passwd(5). The screenshot explains how to open the man page in the correct section. [paul@RHEL52 ~]$ man passwd # opens the first manual found [paul@RHEL52 ~]$ man 5 passwd # opens a page from section 5 man man If you want to know more about man, then Read The Fantastic Manual (RTFM). Unfortunately, manual pages do not have the answer to everything... paul@laika:~$ man woman No manual







Flashcard 4335220428044

Question

What do the linux command below do ?

$ cd -

Answer

Another useful shortcut with cd is to just type cd - to go to the previous directory.

paul@debian8$ pwd /home/paul
paul@debian8$ cd /etc paul@debian8$ pwd /etc
paul@debian8$ cd - /home/paul
paul@debian8$ cd - /etc

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
Chapter 8. working with directories
/share/games paul@debian8$ cd .. paul@debian8$ pwd /usr/share To stay in the current directory, type cd . ;-) We will see useful use of the . character representing the current directory later. <span>cd - Another useful shortcut with cd is to just type cd - to go to the previous directory. paul@debian8$ pwd /home/paul paul@debian8$ cd /etc paul@debian8$ pwd /etc paul@debian8$ cd - /home/paul paul@debian8$ cd - /etc absolute and relative paths You should be aware of absolute and relative paths in the file tree. When you type a path starting with a slash (/), then the root of the file tree is assume







Flashcard 4335222787340

Question

What do the linux command below do ?

ls -lh

Answer

Another frequently used ls option is -h . It shows the numbers (file sizes) in a more human readable format. Also shown below is some variation in the way you can give the options to ls . We will explain the details of the output later in this book.

Note that we use the letter L as an option in this screenshot, not the number 1.

paul@debian8:~$ ls -l -h total 17M
-rw-r--r-- 1 paul paul 17M Sep 17 00:03 allfiles.txt
-rw-r--r-- 1 paul paul 95K Sep 17 00:03 dmesg.txt
-rw-r--r-- 1 paul paul 20K Sep 17 00:04 services
drwxr-xr-x 2 paul paul 4.0K Sep 17 00:04 stuff
-rw-r--r-- 1 paul paul 0 Sep 17 00:04 summer.txt
paul@debian8:~$ ls -lh total 17M
-rw-r--r-- 1 paul paul 17M Sep 17 00:03 allfiles.txt
-rw-r--r-- 1 paul paul 95K Sep 17 00:03 dmesg.txt
-rw-r--r-- 1 paul paul 20K Sep 17 00:04 services
drwxr-xr-x 2 paul paul 4.0K Sep 17 00:04 stuff
-rw-r--r-- 1 paul paul 0 Sep 17 00:04 summer.txt
paul@debian8:~$ ls -hl total 17M
-rw-r--r-- 1 paul paul 17M Sep 17 00:03 allfiles.txt
-rw-r--r-- 1 paul paul 95K Sep 17 00:03 dmesg.txt
-rw-r--r-- 1 paul paul 20K Sep 17 00:04 services
drwxr-xr-x 2 paul paul 4.0K Sep 17 00:04 stuff
-rw-r--r-- 1 paul paul 0 Sep 17 00:04 summer.txt
paul@debian8:~$ ls -h -l total 17M
-rw-r--r-- 1 paul paul 17M Sep 17 00:03 allfiles.txt
-rw-r--r-- 1 paul paul 95K Sep 17 00:03 dmesg.txt
-rw-r--r-- 1 paul paul 20K Sep 17 00:04 services
drwxr-xr-x 2 paul paul 4.0K Sep 17 00:04 stuff
-rw-r--r-- 1 paul paul 0 Sep 17 00:04 summer.txt
paul@debian8:~$

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
Chapter 8. working with directories
--r-- 1 paul paul 96650 Sep 17 00:03 dmesg.txt -rw-r--r-- 1 paul paul 19558 Sep 17 00:04 services drwxr-xr-x 2 paul paul 4096 Sep 17 00:04 stuff -rw-r--r-- 1 paul paul 0 Sep 17 00:04 summer.txt <span>ls -lh Another frequently used ls option is -h. It shows the numbers (file sizes) in a more human readable format. Also shown below is some variation in the way you can give the options to ls. We will explain the details of the output later in this book. Note that we use the letter L as an option in this screenshot, not the number 1. paul@debian8:~$ ls -l -h total 17M -rw-r--r-- 1 paul paul 17M Sep 17 00:03 allfiles.txt -rw-r--r-- 1 paul paul 95K Sep 17 00:03 dmesg.txt -rw-r--r-- 1 paul paul 20K Sep 17 00:04 services drwxr-xr-x 2 paul paul 4.0K Sep 17 00:04 stuff -rw-r--r-- 1 paul paul 0 Sep 17 00:04 summer.txt paul@debian8:~$ ls -lh total 17M -rw-r--r-- 1 paul paul 17M Sep 17 00:03 allfiles.txt -rw-r--r-- 1 paul paul 95K Sep 17 00:03 dmesg.txt -rw-r--r-- 1 paul paul 20K Sep 17 00:04 services drwxr-xr-x 2 paul paul 4.0K Sep 17 00:04 stuff -rw-r--r-- 1 paul paul 0 Sep 17 00:04 summer.txt paul@debian8:~$ ls -hl total 17M -rw-r--r-- 1 paul paul 17M Sep 17 00:03 allfiles.txt -rw-r--r-- 1 paul paul 95K Sep 17 00:03 dmesg.txt -rw-r--r-- 1 paul paul 20K Sep 17 00:04 services drwxr-xr-x 2 paul paul 4.0K Sep 17 00:04 stuff -rw-r--r-- 1 paul paul 0 Sep 17 00:04 summer.txt paul@debian8:~$ ls -h -l total 17M -rw-r--r-- 1 paul paul 17M Sep 17 00:03 allfiles.txt -rw-r--r-- 1 paul paul 95K Sep 17 00:03 dmesg.txt -rw-r--r-- 1 paul paul 20K Sep 17 00:04 services drwxr-xr-x 2 paul paul 4.0K Sep 17 00:04 stuff -rw-r--r-- 1 paul paul 0 Sep 17 00:04 summer.txt paul@debian8:~$ mkdir Walking around the Unix file tree is fun, but it is even more fun to create your own directories with mkdir. You have to give at least one parameter to mkdir, the name of the new







Flashcard 4335224622348

Question

What do the linux command below do ?

$ mkdir -p mydir2/mysubdir2/threedirsdeep

Answer

When given the option -p , then mkdir will create parent directories as needed.

paul@debian8:~$ mkdir -p mydir2/mysubdir2/threedirsdeep
paul@debian8:~$ cd mydir2 paul@debian8:~/mydir2$ ls -l total 4
drwxr-xr-x 3 paul paul 4096 Sep 17 00:11 mysubdir2

paul@debian8:~/mydir2$ cd mysubdir2
paul@debian8:~/mydir2/mysubdir2$ ls -l total 4
drwxr-xr-x 2 paul paul 4096 Sep 17 00:11 threedirsdeep

paul@debian8:~/mydir2/mysubdir2$ cd threedirsdeep/
paul@debian8:~/mydir2/mysubdir2/threedirsdeep$ pwd /home/paul/mydir2/mysubdir2/threedirsdeep

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
Chapter 8. working with directories
rent directory of threedirsdeep does not exist. paul@debian8:~$ mkdir mydir2/mysubdir2/threedirsdeep mkdir: cannot create directory ‘mydir2/mysubdir2/threedirsdeep’: No such fi\ le or directory <span>When given the option -p, then mkdir will create parent directories as needed. paul@debian8:~$ mkdir -p mydir2/mysubdir2/threedirsdeep paul@debian8:~$ cd mydir2 paul@debian8:~/mydir2$ ls -l total 4 drwxr-xr-x 3 paul paul 4096 Sep 17 00:11 mysubdir2 paul@debian8:~/mydir2$ cd mysubdir2 paul@debian8:~/mydir2/mysubdir2$ ls -l total 4 drwxr-xr-x 2 paul paul 4096 Sep 17 00:11 threedirsdeep paul@debian8:~/mydir2/mysubdir2$ cd threedirsdeep/ paul@debian8:~/mydir2/mysubdir2/threedirsdeep$ pwd /home/paul/mydir2/mysubdir2/threedirsdeep rmdir When a directory is empty, you can use rmdir to remove the directory. paul@debian8:~/mydir$ ls -l total 8 drwxr-xr-x 2 paul paul 4096 Sep 17 00:08 otherstuff drwxr-xr-x 2 paul pau







Flashcard 4335226457356

Question

What does the linux command below do ?

$ rmdir -p

Answer

And similar to the mkdir -p option, you can also use rmdir to recursively remove directories.

paul@debian8:~$ mkdir -p test42/subdir paul@debian8:~$ rmdir -p test42/subdir paul@debian8:~$

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
Chapter 8. working with directories
rstuff paul@debian8:~/mydir$ cd .. paul@debian8:~$ rmdir mydir rmdir: failed to remove ‘mydir’: Directory not empty paul@debian8:~$ rmdir mydir/stuff paul@debian8:~$ rmdir mydir paul@debian8:~$ <span>rmdir -p And similar to the mkdir -p option, you can also use rmdir to recursively remove directories. paul@debian8:~$ mkdir -p test42/subdir paul@debian8:~$ rmdir -p test42/subdir paul@debian8:~$ practice: working with directories 1. Display your current directory. 2. Change to the /etc directory. 3. Now change to your home directory using only three key presses. 4. Change to th







Flashcard 4335426735372

Tags
#has-images


Question
[default - edit me]
Answer
Stop sign ahead

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs