Linux----03

Under Linux, everything is a file

 计算机性能:
 横向扩展:集群:人多力量大。
 x纵向扩展:做应用迁移。
 集群:

Linux----03
HDFS + map-reduces = Hadoop cluster
1, the system starts
power
BIOS chip
(1), POST (a hardware device to check whether it is normal)
(2), the file system needs to be hard disk, loaded into memory, so the CPU reads take the amount, and run.
MBR partition (bootloader): is used to find and boot the system to load
LILO embedded
Grub is a boot system startup program. Into a first stage, 1.5 stage, the second stage of
this, the kernel has been loaded, however, can not run common programs; - kernel
At this point, we have to run the first application --init
the init: the operation the system is divided into 0-67 levels; runs on each level corresponding to the application; (designated default start level)
reads the default level 3 (command line) - | chkconfig / rc.d (required for each level the process started)
(01,356)
0 --------------------- off
1 --------------- ------ single user
3 command -------------------
5 ------------------- GUI
6 ------------------- restart
rc.local // read the file system starts last, the administrator may need to run the boot command, add here .
Desktop
Start System 1. System location where the reading order problem (BIOS): VX-T ( Intel) SVM (AMD)
The system can be loaded into memory to go, how can start.
Storage devices: hard drives, network (PXE), U disk, CD / DVD ...
the MBR partition (bootloader) 446 sub-section, is the first partition.
chkconfig role: Specifies the boot service at which level to start or shut down;
--level 345 the Name <ON | OFF> ------- specified level (can not write)
--list ---- List Processes
-f -------- force forced
-h ------- help see the help
Update-rc.d -------- control some programs boot in Ubuntu;
* {chkconfig can be used in ubuntu, you need to install}
2, using basic Linux commands
to minimize interaction with the computer
display than good picture
// ls menu display
detailed information -l // Check the file (property)
-i // inode ( properties)
-H // human human-readable
behind -F ------ reality marker file
-r ------ flashback file contents
-a ------ show all files (including hidden files )


Pwd // current path
$ PWD environment variables (with $ invoked)


Cd // End // switch to the target directory
~ ------ current user's home directory (/ root / Home)
. ------- current directory (with files beginning for hidden files)
.. ------ parent directory of the current directory
- the $ OLDPWD stored once through the catalog


Touch // change timestamp
Touch a.txt
-a modify the access time
-m modification modified time
-t modified to specify what time
-c modify the file Mtime, if the file does not exist, create the file


Mkdir // Create a folder
-p create multilevel subdirectories recursively
-v displays detailed process of creating
tree as a tree directory and file structure of reality
-L NUM see how many sub-directory
-d display only the catalog file


Rm // delete the file filename = rm *
-f Force forced
-i asked to delete the file to change the default command (RM Alias = 'RM the -I')
\ RM abc
/ bin / RM abc
-r delete a directory file


Extended about:
(1) the default NA rm remove directories -rmdir case, rmdir only removes empty directories;
(2), we will need to delete a file or directory under / tmp directory can be; / tmp directory for temporary file directory, file access of 30 days will be automatically deleted.
(3) If you must delete some files, we find by matching it, and then delete the line;
[find extensions! ! ! ]
Find / -name ABC | RM xargs
Find / -name RM -exec {ABC} \;
the Clear clear screen Ctrl + L =
Stat
Ctime modify file attributes
atime access time
time mtime change the contents of


3, the basic format of Linux command
Command (Option) (parameter)
[]: representatives bracket, optional; command specifies the implementation of a feature function;
<>: command object represents; without added <> represents the can not be omitted, the object must be added.
Long Integer options: - the guide start (minus two half size character), the command option is generally used long before the English word format options represented by "." Generally can not be used in combination.
Short option: a short option corresponds to a long integer option, short option can be combined, while the long option can not be combined.
Extended: command, subcommand, [options], [parameters]


4, the common basic Linux commands using
echo $ PATH ----- path echo $
PATH ------- environment variable
if the command is not path path, how to solve?
(1), run by the absolute path to the command;
is the absolute path to execute the command itself, and some commands, is the system default alias (add your own)
Which of the Command Find command // absolute path
\ ls // use of anti slash direct operation
(2), to add the path to the path to the pATH;
pATH = $ pATH: / XXX / XXX
L ------ joint document
- ----- ordinary file
D ----- - directory
storage device must be installed on the file system; the format operation is in the installation file system; common file system format under Windows: 1, NTFE, 2, FAT32
Linux file system format at: ext4
inode index information
Linux----03

Hard link: link through to the inode.
Soft links: symbolic link. There are soft-linked files like shortcuts for Windows.
The difference between hard and soft links connected:
1, at different times, and the source file size and create a soft link to a file; the size of the hard-linked files and source files and time of creation of the same.
2, if the original file is deleted, the soft link can not access, and hard link is possible.
3, due to the characteristics of symbolic links, which may lead to cross disk partitions, but this feature does not have a hard link

Extended tips:
8bit byte
hard drive needs to run
RAM Random Access Memory, ramdisk virtual memory disk
ping: the world's only
* variable: some are named in memory only.

Guess you like

Origin blog.51cto.com/14475762/2425762
03
03