第六周

Section 7:

Linux commands are capital sensitive.

Command line operation. This mode costsmuch less than GNOME.

shut down, halt, locate, cd, find, touch,apt, yum, zypper

Absolute and relative pathname.

Hard link and soft link.

 

Section 8:

File operation.

File system Hierarchy Standard (FHS) providesLinux developers and system admin a standard directory structure for thefilesystem.

Filesystem can be mounted anywhere on themain filesystem tree at a mount point. Automatic filesystem mounting can be setup by editing /etc/fstab .

NFS (The Network Filesystem) is a usefulmethod for sharing files and data through the network systems.

/proc called pseudo filesystems, only existin memory.

Normal user start with $, root user #

/var may be put its own filesystem so thatgrowth can be contained and not fatally affect the system.

/boot boot files

Patch is a very useful tool in Linux. Manymodifications to source code and configuration files are distributed with patchfiles as they contain the deltas or changes to go from an old version of a fileto the new version of a file.

File extensions in Linux do not necessarilymean that a file is of a certain type.

cp used to copy files. rsync is useful tobackup files.

gzip, bzip2, xz and zip are used tocompress files.

tar = tape archive

dd used to exact copies even of entire diskpartition efficiently.

 

Section 9:

Linux is a multiuser system.

who, whoami, sudo

/etc/profile provides the global settings.

Startup files could customize the user’sprompt, set terminal type, command line shortcuts and alias, and set the defaulttext editor etc.

$history could recall a list of previouscommands.

$chmod permissions filename

$chown owner filename

$chgrp group filename

 

Section 10:

Lite editors: nano, gedit.

$vi , this editor has 3 modes could be switched. 1, type i to start insertmode. 2, enter Esc to start control mode. 3, In control mode, type : + character,line mode.

Editor emacs uses Ctrl + character to usehyper functions.

Section 11:

The root account has authority over theentire system. Very risky! Use $sudo instead.

Calls to sudo trigger a lookup in/etc/sudoers (qualified user) or /etc/sudoers.d (qualified allowance)

Sudo log file, /var/log/auth.log underDebian family, /var/log/messages in other distribution.

One process cannot access another process’resources, even when that process is running with the same user privileges.

Encode passwords, SHA-512 algorithm

Pluggable Authentication Modules (PAM) canbe configured to automatically verify that pass words created or modified usingthe passwd utility are strong enough.

IT security policy should start withrequirements on how to properly secure physical access to servers andworkstations.

Keeping system updated to latest version.

 

Section 12:

Every IP address contains both a networkand a host address field.

DNS /etc/hosts

$ifconfig, $ip addr show, $ip route show,$ping

Firefox, Google Chrome, Chromium, Epiphany -graphical browsers

Non-graphical or text browsers - lynx,Links and w3m

$wget - download webpages

$curl – obtain info about URL’s

FTP - $ftp, $sftp, $ncftp, $yafc

$ssh – run commands on remote systems.

 

Section 13:

Manipulating text

$cat - read, print, combine files

$echo - display a line of text either onstandard output or to place in a file.

$sed – stream editor, to filter and performsubstitutions on files and text data stream.

$awk – interpreted programming languagetypically used as a data extraction and reporting tool.

$sort – used to sort text files and outputstreams in either ascending or descending order.

$uniq – eliminates duplicate entries in atext file.

$paste – combines fields from differentfiles and can also extract and combine lines from multiple sources.

$join – combines lines from two files basedon a common field. Work only if files share a common field.

$split – breaks up a large file into equalsized segments.

Regular expressions are text strings usedfor pattern matching.

$grep – searches text files and datastreams for patterns and can be used with regular expressions.

$tr – translates characters, copiesstandard input to standard output and handles special characters.

$tee - accepts saves a copy of standardoutput to a file while still displaying at the terminal.

$wc – word count, -l lines, –c bytes, -wwords.

$cut – extracts columns from a file

$less – view files a page at a time andallows scrolling in both direction

$head – display first few lines of a fileor data stream

$tail – display the last few lines of afile or data stream

$strings – extracts printable characterstrings from binary files

The z command family is used to read andwork with compressed files.

 

Section 12:

Printing method.

CUPS provides 2 command line interfaces:system V and BSD interfaces.

The CUPS interface is available at http://localhost:631

$lp and $lpr are used to submit a documentto CUPS

$lpoptions used to set printer options anddefaults.

$enscript is to convert a text file toPostScript and other formats.

PDF editors: pdftk, pdfinfo, pdfmod (GUI)

PostScript editors: flpsed

 

Section 15:

Most commonly used shell in Linux is bash.  .sh file

Environmental variables are quantitieseither pre-assigned by the shell or defined and modified by the user.

To make environmental variables visible tochild processes, they need to be exported.

If statement, [condition], end with fi

 

Section 16:

Manipulate strings to perform action suchas comparison, sorting and finding length

Use Boolean expressions when working withmultiple data types including strings or numbers as well as files.

The output of a Boolean expression is eithertrue or false.

Boolean expressions include &&, ||,and !

Using case statement. One value of avariable can lead to different execution paths.

Loop statement: for, while, until

Debugging method.

Start: set –x

End: set +x

The standard and error outputs from ascript or shell commands can easily be redirected into the same file orseparated files to aid in debugging and saving results.

$RANDOM environment variable, which isderived from the Linux kernel’s built-in random number generator, or by theOpenSSL library function, which uses the FIPS140 algorithm to random numbersfor encryption. Detail about FIPS140: http://en.wikipedia.org/wiki/FIPS_140-2

Linux allows you to create temporary filesand directories, which store data for a short duration, both saving space andincreasing security.

 

Section 17:

Processes are used to perform various taskson the system

Processes can be single-threaded ormulti-threaded

Processes can be of different types such asinteractive and non-interactive.

Every process has a unique identifier (PID)to enable the operating system to keep track of it.

The nice value, or niceness, can be used toset priority.

$ps - provides information about thecurrently running processes.

$top - to get constant real-time updateabout overall system performance as well as info about the processes running onthe system.

Loading average indicates the amount of utilizationthe system is under at particular times.

Linux supports background and foregroundprocessing for a job.

$at - executes any non-interactive commandat a specified time.

$cron – used to schedule tasks that need tobe performed at regular intervals.

Linux system offer entire suites ofdevelopment applications and tools, including compilers and debuggers.

Linux systems offer a number of soundplayers including Amarok, Audacity and Rhythmbox

Linux systems offer a number of movieplayers including VLC, MPlayer, Xine and Totem

Linux systems offer a number of movie editorsincluding Kino, Cinepaint, Blender among others

The GIMP (GNU Image manipulation Program)utility is a feature-rich image retouching and editing tool available on all Linuxdistributions.

Other graphic utilities that help performvarious image-related tasks are eog, Inkscape, convert and Scribus.

 

Final exam: 29/30    97%

 ----------------------------------------------------------------------------------------------------------------

2月过年休假了12天,MOOC计划如期完成。下一步计划继续推进Python的学习。

结束learningpythonthehardway的大练习以及一些尾巴。

在读完Think python之后仍然觉得对class 以及继承的一些结构不能完全理解,仍需巩固,或者说依靠实际的项目来推进。

我基础学完了,接下来该学点什么: https://github.com/Wilbeibi/NotesIndex/blob/master/Python_Index.md

那就从网络爬虫开始吧 :)

共勉!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值