Category Archives: Internet Technology

mkdir no such file or directory in linux/unix

mkdir no such file or directory – This error is reported because you created a multi-level directory and the intermediate directory does not exist. We can use mkdir -p option to solve. Continue reading

Posted in Internet Technology | Tagged | Comments Off on mkdir no such file or directory in linux/unix

mkdir if not exists in linux/unix

mkdir creates a directory if it does not exist, we can use the mkdir -p option. syntax: mkdir -p foo/bar/baz, will create directories foo, foo/bar, and foo/bar/baz if they don’t exist. Continue reading

Posted in Internet Technology | Tagged , | 1 Comment

linux view apache logs

In Linux, apache logs (error logs and access logs) provide useful information for system administrators to solve and locate problems. Continue reading

Posted in Internet Technology | Tagged | Comments Off on linux view apache logs

Linux log view using linux command line

Linux log view using linux command line, tail -f: added log content for real-time monitoring, cat: view all log content, more: view log content by page Continue reading

Posted in Internet Technology | Tagged | Comments Off on Linux log view using linux command line

sed tutorial: sed address and address range(select lines) with examples

sed address and address range tutorial, by using addresses or address ranges, the sed command can apply certain actions to these address lines. Continue reading

Posted in Internet Technology, Sed Command, Text Processing | Tagged , , , | Comments Off on sed tutorial: sed address and address range(select lines) with examples

Shell Command Test

The command test in the shell is used to check whether a condition is true. It can test numbers, strings and files. Number arguments test Tag Description -eq Integer1 and Integer2 variables are algebraically equal -ne Integer1 and Integer2 variables … Continue reading

Posted in Internet Technology | Tagged , | Comments Off on Shell Command Test

Shell Flow Control

The flow control of shell cannot be empty which is different from other languages ​​such as Java and PHP.The following is the writing of PHP flow control: We cannot do like this in sh / bash. If there is no … Continue reading

Posted in Internet Technology | Tagged , | Comments Off on Shell Flow Control

Shell Command Printf

In the previous chapter we learn the command echo, this chapter we will introduce the command printf. Printf mimics the printf () program in the C library. Printf is defined by the POSIX standard, so scripts that use printf are … Continue reading

Posted in Internet Technology | Tagged , | Comments Off on Shell Command Printf

Shell Command Echo

Echo in shell is similar to the echo in PHP which all output string.The syntax for echo is: You can use echo to achieve more complex output format control. 1. Display ordinary string: The double quotes here can be omitted,the … Continue reading

Posted in Internet Technology | Tagged , | Comments Off on Shell Command Echo

Shell Basic Operators

There are various operators supported by shell.We will now discuss the following operators: Arithmetic Operators Relational Operators Boolean Operators String Operators File Test Operators Bourne shell didn’t originally have any mechanism to perform simple arithmetic operations but it uses external … Continue reading

Posted in Internet Technology | Tagged , | Comments Off on Shell Basic Operators

Shell Arrays

Shell arrays can hold multiple values,Bash shell only support one-dimensional values(can not support multi-dimensional) .We don’t need to define array size during initialization (similar to PHP).The subscripts of array elements start from 0 which is similar to most programming languages. We … Continue reading

Posted in Internet Technology | Tagged , | Comments Off on Shell Arrays

Shell Passing Arguments

Arguments can be passed to the script when it is executed,we can get the arguments by the formats like $n.Inside the script, the $1 variable references the first argument in the command line, $2 the second argument and so forth. … Continue reading

Posted in Internet Technology | Tagged , | Comments Off on Shell Passing Arguments

Shell Variable

When you define the a variable name, the name should not prefix $(excepting in PHP ),for example your_name=”www.linuxcommands.site” We should not add blank space between the variable name and the equal sign which is different among your similar program languages.The … Continue reading

Posted in Internet Technology | Tagged , | Comments Off on Shell Variable

Shell tutorial

The Shell is a program written in C language, it is a bridge use Linux users.The Shell is a command language and a programming language.Shell is a kind of application, the application provides an interface to the user through the … Continue reading

Posted in Internet Technology | Tagged , | Comments Off on Shell tutorial

Directory structure and meaning of Linux system

After the login system, under the command window type the command:  You will see as shown in the figure below: Tree directory structure: The following is the explanation for these directories: /bin: Bin is the abbreviation of Binary, this directory holds the most frequently used commands. /boot: Store here are some of the core files used boot … Continue reading

Posted in Internet Technology | Tagged | Comments Off on Directory structure and meaning of Linux system