Mastering Linux Bash call (transfer).

July 21, 2011
Transfer: spazzzz.blog.51cto.com/2707720/499923 enable root user using sudo passwd root user to disable the call using the passwd-lls [-adlsht]: Column the current directory reveals the non-hidden files-a directory of all files-d reveals itself to the list in the form-l-s reveal detailed information revealing the file size in blocks-h-t with a bearing unit according to the latest amendments to reveal something to reveal 3 in Linux kinds of work when rigorously enforce property atimeaccess change ctimechange read or change permissions, owners, when the number of links change when change mtimemodify amended cd PATH: change the current directory path to a monopoly return on the layer of PATH cd .. cd – back on the sequential use of return the user home directory cd directory, similar to the path cd ~ pwd reveals the current path of the current recommended changes call for a high-level: pushd PATH: place the directory stack, switch between multiple directories. Switching to the PATH directory, and the original directory and the PATH directory onto the stack to a fictitious; if you do not specify PATH, will return to the previous directory, and the last two directories in the stack to communicate. -N Do not change the current directory, the directory to stack NN represent numbers from 0 to switch to the directory dirs: Lists the current stack to retain the directory listing. Reveal the directory stack type-v-c empty stack popd: 0 pop-up in the directory stack. -N Do not change the current directory NN table numbers, pop-up the directory mkdir NAME: path created in the current folder NAMEtouch NAME: Founded in the current path taken lightly file NAMEmknod NAME: for the construction of P, B, C type NAME file cat [ -nb] NAME: NAME reveals the contents of the file in the terminal-n-b with the line number of blank lines are not numbered mv NAME1 NAME2: Rename the NAME1 NAME2rm file: remove file without confirmation-d Dir1 need to exclude directories Dir1 no need to confirm (the equivalent of DOS in the deltree). -I file1 (to remind the user to confirm later removed file1)-f file2 (file2 if ever exists, its contents covered in this call are not required to verify)-r * recursively remove files, in case there is a subdirectory the current directory, which is also excluded files and directories-rf xx xx directory excluding Linux file permissions chmod 751 test.java: harvest test.java permission is-rwxr-x – x, 7, said three user permissions are both 111, and is exactly 7 decimal; 5 into binary is 101, empathy is the other position of authority 1, is x rigorously enforce. Also able to use letters, u, g, o parting said three groups, and means reward, – said its efforts to abolish the directory permissions have the ability to open, but only the last directory in the directory have a sticky bit, otherwise it will inherit the parent to rigorously enforce the rights. Advanced permissions: drwxrwxrwtt said sticky bit, is to allow users to remove their own files can only assume that there have been in the position x, then these particular symbols (suid, sgid, sticky) reveals the lowercase letters (s, s, t ), otherwise, revealing for the capital letters (S, S, T) chmod a t xX specific sign Suid: set user id Sgid: set group id sTicky: sticky bit symbol is composed of three specific bits abc said, c that T, b said Sgid, a said Suideg: 101 of the document that set Suid and sTicky bit, even if the five specific octal permission bits of the sign bit on the front eg: a file test species identified as-rwxr-xrwx chmod 7747 harvest for the test-rwsr-Srwt 7747 111 111 100 111umask number equal to amend the default permissions created when the creation of the directory system of statutory authority to include rigorously enforce, and thus the maximum is 777; the default include file can not be rigorously enforce, and thus the maximum is 666. umask even if default permissions of the anti-code eg: umask = 022, the creation of the directory permissions are 755, file permissions are 644. umask = 002, the directory permissions are 775, 664 file permissions are used umask: 022:755 644027:750 640002:775 664006:771 660007:770 660groups username where username revealed that all groups and owner change file group called chown
chown [-cfhvR] user [: group] file …
-c were indeed if the file has been altered, it reveals its more adapted for
-f If you can not change, do not reveal and correct erroneous information
-h changes only at the file link, instead of pointing to the link earnest file
– v reveal those changes with informative material
-R directory of all files on a folder recursively change
user: [group] refers to a change in the user group for the group User
eg: chown-R fenix: root *
that the current directory of all files and folders to the root group use of those fenixchgrp [-hR] groupname filename the file is set to change to change the symbolic link-h-R recursively change the id username username revealed the uid, gid, and reveals the history of personal id call ps [-Aw] [aux]: the current running process bash-A list of all History
-w reveals more information
-au reveal detailed information
-aux reveals all, including the history of the use of those other eg: ps auxgrep History reveals the nautilus nautilus pstree:-a revealing history of the tree to reveal the full course of the call and the parameters
-c, if repeated course name, departure lists renice priority [[-p] pid …] [[-g] pgrp …] [[-u] user …]: reassign one or more process priority order
will journey with id 987 and 32 The journey and the journey of a person as a daemon and root priority order number plus 1. eg: renice 1 987-u daemon root-p 32pkill NAME: quick kill process. eg: pkill firefoxskill [signal to send] [options]: the legal decision process
statutory decision process that is, terminal code, the use of those names, the process code, command names
< br />-t terminal code (tty or pty)
-u use those names
-p process ID (pid)
– c command names, eg: those who still use three user1, user2, user3. skill-STOP user1 user2 user3kill [-s signal |-p] [-a] PID: terminate the process called kill-l: back to semaphores
0-normal 1-signalSIGHUP, Hangup. # reboot
2-signalSIGINT, Interrupt # break, ctrl c3-signalSIGQUIT, Quit
4-signalSIGILL, Illegalinstruction 5-signalSIGTRAP, Trace / breakpointtrap

6-signalSIGABRT, Aborted 7-signalSIGEMT, Emulationtrap
8-signalSIGFPE, Arithmeticexception 9-signalSIGKILL, Killed # unconditionally closed
10-signalSIGBUS, Buserror 11-signalSIGSEGV, Segmentationfault
12-signalSIGSYS, Badsystemcall 13-signalSIGPIPE, Brokenpipe
14-signalSIGSTOP, Stopped (signal) 15-signalSIGTERM, Terminated # warm end

16-signalSIGXCPU, CPUtimelimitexceeded 17-signalSIGTTIN, Stopped (ttyinput)
18-signalSIGCONT, Continued # restore, fg, bg19-signalSIGTTOU, Stopped (ttyoutput)
20 – signalSIGTSTP, Stopped (user) # suspend the running, ctrl z 21-signalSIGXFSZ, Filesizelimitexceeded
top called: dynamic process of running up the back to reveal that the current system is running a number of folks husband load average: 0.06, 0.60, 0.48 system load, that is, the balance of the task queue length. Three values ??parting of 1 minute, 5 minutes, 15 minutes ago to the current equilibrium value Cpu (s): 0.3% us user-space cross-borrowing CPU percentage, 1.0% sy cross-borrowing kernel space CPU percentage, 0.0% ni change within the user-space process priority over the course of cross-borrowing CPU percentage, 98.7% id ease CPU percentage, jae connectors 0.0% wa expect the percentage of input and output of the CPU time priority NI nice PR value, negative value indicates higher priority VIRT fictional history of the use of total memory history of use of RES, has not been swapped out of physical memory size, kb SHR shared memory unit, kb units in the course of events S s sleep, r run, t trace or static, z zombie, d% CPU is not interrupted sleep last updated to the current CPU time borrow money for a short time percentage% MEM process of using the percentage of physical memory TIME history of the use of the CPU time total, 1 / 100 second units COMMAND calling line press the f key to decision to reveal the column, press o to change the column to reveal the order, press R key to reverse the current sort of linux like debian release software use discipline called apt: apt-get [-qy] [-c config_file] [options] software …
q in the background environment rigorously enforce
y y approval at the positive response
c followed with a file
options
update, install, remove, purge, clean, dist-upgrade
apt-cache [search project]
search project
search, show,
showpkg rely on the software then lists the properties and functions
dump header and list all software relying on coherent properties of software
pkgnames lists all the system software names of senior software discipline called dpkg [-ilLSC] -i install package-l look at the package is installed-L look at what the package includes file-S / path / to / file look at the system in which package a file is supplied by the-C to see which package did not install the network ended the call type: ifup eth0 open eth0, ifdown eth1 off eth1
ifconfig [inte *** ce] [options], set up the network equipment called
inte *** ce interface name, such as eth0
options, options
up

Posted: January 7th, 2012
at 7:46am by admin

Tagged with


Categories: Uncategorized

Comments: No comments


Think E-Cigarette, Think Kimree!