Fortress Machine (jump connection) function:Users who need to log on to the production server must first log on to this server and then log on to the production server from this server.You can limit the use of SSH and exit commands, or write a script yourself to let the person who is logged in choose.Here you can install the Lshell on the bastion machine (jump Connect) server to achieve various restrictions.1. Installing
reads the/etc/profile and ~/.profile configuration files sequentially. As the Non-login shell starts, bash reads the environment variable env points to the file.Usually we want to customize some configurations, write the configuration in ~/.BASHRC, and then read the ~/.BASHRC in ~/.bash_profile, which ensures that the login shell and the interactive non-login shell get the same configuration. As for/etc/profile do not easily change, after all, will affect the overall system configuration.The fo
. Test:Set the following variables in ~/.bash_profile:Lshell= "Login Shell would see this message"Launch an interactive non-login shell and interactive login shell, respectively, to view the Lshell variables:#注意: $ is not a command$ bash$ echo $lshell $ exitexit$ bash--login$ echo $lshelllogin Shell would see this message$ exitlogoutIt is visible that the Non-login shell is not read by the ~/.bash_profile,l
digits to compare
Reference CodeThe following code is affixed to implement the Shell prompt:See:https://github.com/luoyhang003/linux_kernel_expriment/tree/master/exp2/ * * prompt.c----Description *------------------------------------------------------------* date:april 8th, 2 016 * Copyright:written by Jason Luo-[email protected] * Function:promption of the Shell *---------------------------- -------------------------------- */#include "lshell.h"Const intMax_name_len = the;Const intMax_pat
, choosing a suitable release version and a good textbook will start to enter the door of Linux. In this phase, you need to master the following knowledge:
Use of the lLinux GUI
LLinux simple directory structure
Common lLinux commands
LLinux installation
Having mastered the above knowledge, I can say that I am already a beginner in Linux. I am fully competent to make and maintain the Linux operating system.
Linux intermediate engineer
After the preliminary stage, you need to learn the following
Common commands-eval analysis 1. working Principle and usage www.2cto.com usage: eval command-line principle: eval is mainly used in the special processing of parameters. In general command lines, shell can only process parameters once, such as conversion and variable transformation; but after adding eval, the parameter can be processed twice; on the Internet, it is said that it is unreasonable to process command-line twice. An eval can only be used by shell to process parameters once. Therefore
‐lShell ProgrammingIn fact, the interactive interpretation and execution of user input commands as an imperative language is only one aspect of shell functionality. The shell can also be used for programming. It provides a means to define variables and parameters and a rich program control structure. Using shell programming resembles a batch file in DOS, called shell script, or shell program or shell command file.Shell script file:-is a text file-A co
CMake version5.7 Compile CMake requires a minimum version of 2.8 and is currently 2.6, so you need to upgrade the CMake version. Information is as followsShell> CMake. -dcmake_install_prefix=/db/mysql/mysql_57-dmysql_datadir=/db/mysql/mysql_57/datacmake Error at CMakeLists.txt:21 (cmake_minimum_required): CMAKE 2.8.2 or higher is REQUIRED. You are running version 2.6.4--configuring incomplete, Errors occurred!shell> cmake--version//view CMake release CMake Versi On 2.6-patch 4 (if Yum is install
Command Umount [Mount Point]View disk usage DF [-parameters]Df-hDf‐lDF [Directory full path] to see which partition a directory is inView Linux system partition specifics Fdisk‐lShell ProgrammingThe fact that the command language interactively interprets and executes user input commands is only one aspect of shell functionality. The shell can also be used for programming. It provides a means of defining variables and parameters, as well as a rich pro
management
LLinux system and log Maintenance Management
LLinux Security Optimization
LLinux system backup and recovery
LShell preliminary Programming
With the above knowledge, you can fully manage the Linux servers of small and medium-sized enterprises.
Linux Senior Engineer
If you want to achieve something in the Linux field, you need to learn more advanced knowledge:
L Server Management
NLinux DNS Server
NLinux NIS Server
NLinux Mail Server
NLinux
First, the text processing1. Extract key word frequency times by row (for example, 5th column)awk ' begin{fs= ' | '} {a[$5]+=1;} END {for (i in a) print I ":" A[i];} ' Opt. Forumlogicnewserver_action_20161107.log | SORT-NRK 2-t ': '2, log users per minute traffic statisticsHere we count the traffic per minute arrival rate for the "getthreadlist" interface in the log.awk ' begin{fs= ' | '} $5== "Getthreadlist" {a[substr ($1,0,16)]+=1;} End{for (i in a) print I "\ T" a[i]} ' OPT. Forumlogicnewserv
-type d-name. SVN | Xargs Chown-r www:wwwFind/-iname *?//not case-sensitive, accurate search?Find/-size +204800 files larger than 100MFind/-size-204800 files less than 100MFind/home-user www//According to the owner to findFind/home-group www//belongs to groupfind/home-cmin-5 files and directories with properties modified within 5 minutes-amin//visited-cmin//changing properties-mmin//Modifying content-type D CatalogueF fileFind/etc-name initab-exec ls-l {} \; List the file properties after checki
directory.Several important commandsmount CommandMount [-parameters] [device name] [Mount Point]Uninstall CommandUmount [Mount Point]View disk usageDF [-parameters]-Df-h-Df‐l-DF [Directory full path] to see which partition a directory is inView Linux system partition specificsFdisk‐lShell ProgrammingIn fact, the interactive interpretation and execution of user input commands as an imperative language is only one aspect of shell functionality. The she
Tags: Scan union read filter Lshell instead of new schema except1. Negative condition query cannot use indexSELECT * from order where status!=0 and stauts!=1Not in/not exists are not good habitsCan be optimized for in query:SELECT * from order where status in (2,3)2. A leading fuzzy query cannot use an indexSELECT * FROM order where desc like '%XX 'Instead of a leading fuzzy query, you can:SELECT * FROM order where desc like ' XX% '3. Indexes are not
Contact Us
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.