?

Log in

linux professional institute's Journal
 
[Most Recent Entries] [Calendar View] [Friends]

Below are the 7 most recent journal entries recorded in linux professional institute's LiveJournal:

Wednesday, October 19th, 2005
10:12 am
[alekg]
questions
These are some of the questions that I have collected from books and websites.*
I don't guarantee that these will be asked, but I will guarantee that it will help you better study for the exam. Please be advised to really study them and not memorize them. Research.This is not MCSE. This is Linux. Have fun.

Please email me @ lincerts@gmail.com if you like me to use your own questions or you have seen a website with questions.


Which of the following directories must be part of the root filesystem?Select all that will apply
a. /etc
b. /home
c. /lib
d. /usr
e. /root

Consider the following console output, excerpted from among other lines of output. Which one of the commands produced it?
/dev/hda8 1.9G 559M 1.2G 30% /home
a. /du -s
b. /du -k
c. /df -h
d. /df -k
e. /df -m

What ext2 filesystem attribute allows a process to take on the ownership of executable files's owner?
__________


How many IDE devices can be installed and simultaneously used in a typical Intel-based system? Select one
a. 1
b. 2
c. 3
d. 4
e. 5

Which one of the following utilities ouputs a text file with line numbers along the left margin
a. tar
b. wc
c. tr
d. nl
e. ln

What command can display the contents of a binary file in readable hexadecimal form? Select one
a. xd
b. hd
c. od
d. Xd
e. dump

What is the PID of init?Select one.
a. 0
b. 1
c. 2
d. undefined
e. unknown

What two commands will display the status of processes of a Linux system?
a. ls and df
b. ps and top
c. ps and df
d. df and top
e. du and df









* Reference: O'Reilly's LPI Linux Certification in a Nutshell, A Desktop Quick Reference, Jeffrey Dean, 2001

Current Mood: thoughtful
10:04 am
[alekg]
vi
        Vi is probabably one of the oldest Unix programs out there. Vi is command line screen editor used by many Unix admins and Hackers. It is important that you understand how to navigate vi and how to use it effectively since vi might the only text editor on some systems. Some people think it is very archaic program. I myself think is very powerful editor with rich sets of options. I will try not to go over all the options; just those that pertain to LPI.

        Vi has 2 modes of operation
           1. command
           2. Insert

        In Command mode you enter Commands that are case sensetive combination of one or more letters. They are to do some sort of action. Examples of command mode are saving, navigating, deleting and so on ..
        In Insert mode, you starting inserting words.
        To switch from the command mode to insert mode press the i key. To switch to command mode press the Esc key. Hence the defualt mode is the command mode

Exiting commands
:n        Next file
:q         quit without saving changes
:q!         same as :q and without confirmation
:wq      Write to the file(if changed) and quit
:x         same as wq
:ZZ         same as wq


Moving around commands
Ctrl-b        Move up one screen
Ctrl-f        Move down one screen
0        Move to the begininig of the current line
^        Move to the first non-whitespace character on the current line
$        Move to the end of current line
b        Move backward one word
G        Move to the end of the file
h        Move ahead or character
H        Move to the top of the screen


Inserting
i     insert Mode to place text before the cursor
a    insert mode to append, or append, or place text after the cursor


Editing
c   Delete to the end-of-line and enter insert mode
r   Enter replace mode(a variant of insert mode)and overwrite existing characters


Deleting
dl    Delete the next character
dw    Delete the current word
dG    Delete to the end of the file
dd    Delete the entire current line
D    Delete to end of line


Copy & Paste
yl    Yank forward one character
yw    Yank forward one owrd
yG    Yank to the end of the file
yy    Yank the entire current line
P    Paste text one line above the cursor
p    Paste text one line below the cursor


Searching
/pattern    search forward for pattern
?pattern    search backward for pattern
n    repeat the last search
N    Repeat the last search in the opposite direction




See Vim,Elvis

Current Mood: accomplished
10:01 am
[alekg]
pwd
pwd     prints path of the working/current directory


This is a program that prints the path of your working or the current directory. The command does not have any options.This is as simple as it gets.

Current Mood: listless
9:55 am
[alekg]
ls
ls     list directory contents


This is one of the most basic commands you will learn in Linux. ls has been around since Unix was around. Over the years it has acquired a lot of options. In this posting I will go over the most common ones and not so common one that will be asked in the LPI test.


ls [options] ... [FILE] ...


-a or --all     do not hide . entries. Print all files
--author      print author of each file
-B or --ignore-backups     ignore backups
-C      list entries by column
--color=[When]     controls whether color can be used to
              distinguish file types. The options are never, always or auto
-F or --classify     classify based on file types. Append (*,/,=,@,|).
-h or --human-readable     print size in human readable              format(mgs,gigs,k's)
-si     same as -h but uses power of 1000 instead of power of 1024
-i     prints inodes
-l     use long listing
-m     Fill listing with a comma separated listing of entries
-n or --numeric-uid-gid     like -l but list uid's and gid's numerically
-p or --file-type     same a -F
-Q or --quote-name     enclosed entries in double quotes
-r or --Reverse     Sort in reverse
-R or --recursive     display directories recursively
-s or --size     print size of each file in blocks

-S     sort by file size
-t     sort by modification time
-x     lists entries by lines instead of columns
-X     Sort alphabetically by file extention
--version     prints version information

--help     lists entries by lines instead of columns

As you can see there are a lot of options for ls. Obviously you are not going to remember and use all of the options. Although some can be very useful in scripts,some users use them depending on situation in hand. One can also create a alias with this crazy options in his/hers profile. As for the LPI the basic options should suffice. Email me @ lincerts@gmail.com for other options to include for testing purposes and I will more stuff later. For the rest use the comment link.
9:48 am
[alekg]
mv
mv     moves or rename files


This again like cp is one of those old Unix files. It moves or renames files


mv [OPTIONS]...[SOURCE]DEST
mv [OPTIONS]...[SOURCE]...DIRECTORY
mv [OPTIONS]...--targetdirectory=DIRECTORY SOURCE..




--backup[=CONTROL]      make a backup of each existing destination file
-b      like --backup but does not accept an argument
-i or --interactive      prompt before overriding
-s or --suffice=suffice     
change the default backup suffice
-v or --verbose     print what is being done
-u or update     move when the source is newer than destination or destination file is missing

The basic format of this command is to move a file from locate a to location b. If the source and destination are in the same directoy, the action would be a move.

Current Mood: calm
Friday, October 14th, 2005
10:49 am
[alekg]
cp
cp     list directory contents


This again is one those of usefull old Unix programs. It basically copies files and directories.


cp [OPTIONS]...[FILES] [SOURCE][DEST]
cp [OPTIONS]...[FILES]...[SOURCE]...[DEST]
cp [OPTIONS]...--targetdirectory=DIRECTORY[SOURCE]


-a or --archive     archive. Same as -dpR
-i or --interactive      prompt before overriding
-l or --link      link files instead of copying
-p     preserve mode, ownership,timestamps
--preserve[=ATTR-LIST]      same as -p, but able to specify attributes.
--no-preserve     don't preserve attributes
-R or -r or recursive     copies directories recursively
--sparse[=WHEN]     controls creation of sparse files. Auto,always and never are the options.
-v or --verbose     print what is being done
-u or update     copy when the source is newer than destination or destination file is missing

There is nothing complicated about this command. Yet, sometimes you would be forced to use some of it's options. Another thing I forgot to mention is you could use wildcards SOURCE and DEST(not sure) arguments. For a tutorials of wildcards see my future blogs..

Current Mood: chipper
6:41 am
[alekg]
Commands
This is a posting of linux commands that will be in the LPI tests in some form or another. Be advised that I will update the command list on a regular basis. If you know of any commands that are you are not listed please contact me @ alek.grigorian@gmail.com. For other comments use the comment link.

Some of the comands are shell commands, some are regular commands and some actually demaons.

adduser
alias
alien
apropos
apt-get
at
bash
bg
cat
cd
chage
chgrp
chmod
chown
cp
crontab
cut
dhcpd
dnsdomainname
df
dig
domainname
dselect
dmesg
dpkg
du
echo
edquota
emacs
exit
export
fdisk
fg
file
find
finger
fmt
ftp
fsck
fwhois
gcc
gpasswd
grep
groupadd
groupdel
groupmod
grpconv
grpunconv
gunzip
gzip
head
host
hostname
ifconfig
inetd
info
init
insmod
jobs
kill
killall
ldconfig
ldd
less
lilo
ln
locate
lpc
lpd
lpq
lpr
lprm
ls
lsmod
mailq
make
man
minicom
mkdir
mkfifo
mkfs
modinfo
modprobe
mount
mt
mv
named
netstat
nice
nslookup
passwd
pico
ping
pppd
pr
ps
pstree
pwconv
pwd
pwunconv
quota
quotacheck
quotaoff
quotaon
renice
repquota
rm
rmdir
rmmod
route
rpm
sed
shutdown
smbd
source
split
ssh
startx
stat
su
tac
tail
tar
telinit
telnet
top
tr
touch
traceroute
ulimit
umask
umount
updatedb
userdel
usermod
vi
wc
whatis
which
whois
xargs
xdm
xf86cfg
XF86Config
xinit
xset
xfs
xterm

Current Mood: accomplished
About LiveJournal.com