Unix/Linux Command memorandum, unixlinux Memorandum
Arp: The ARP cache contains one or more tables used to store IP addresses and resolved MAC addresses.
// Extract all Bound0 ip and mac Information
Arp-n-I bond0 | awk '$5 = "bond0" {print $1, $3 }'
Sed: used to edit the text in a document or string through a series of commands
// Read a single row of data from/script/ip and print it out.
Sed-n '1p'
ChmodIs a Command Used in UNIX systems to control the user's permissions on files (ChAngeMoDA combination of e-word prefixes) and functions. Only the file owner and the Super User can modify the file or directory permissions. You can use absolute mode to specify the object ACL in symbolic mode.Usage
ChmodUse syntax
$ chmod [options] mode[,mode] file1 [file2 ...]
Use the LS
Plink_path ="C:/plink.exe"'Plink.exe path
Username ="Username"'User name
Password ="Password"'Password
Host ="192.168.0.1"'Unix/Linux server address
Command ="Ls"'Command to be executed
Set oshell = Createobject ("Wscript. Shell ")
'Combine plink commands, including logon and Command Ex
Unix/Linux use the Find command to find the file to find the empty directory: find/path-depth-typed-emptywww.2cto.com to Find the empty File: find/path-depth-typef-empty find the file by name: find/path...
In Unix/Linux, run the Find command to search for an empty directory: find/path-depth-type d-empty www.2cto.com:
under the use of Linux/unix, often use the text interface to set up the system or operating system, the author himself in the process of work is also constantly in touch with this command, so forThis special brewing, preparation, began the writing of this article. This paper mainly records some of their usual linux/unix under the operation of
Several useful Unix command shortcuts
1.!$ Bash or zsh represents the last parameter of the previous command, for example, where the!$ represents file-b, it is convenient to view the contents of the File-b file;
Copy Code code as follows:
$ CP file-a File-b
$ vim!$
2.grep-ri-r represents a recursive lookup, found in all subdirectories, and I denot
Recently, my colleague introduced me to the screen command, which is really good. In the past, in order to let the program run without the terminal, either let it run in the background or use nohup to run, but if the program needs to interact, it will be troublesome. For example, you need to use SCP for copy, enter a password, and the data volume is large. It takes a long time. People who have met will know the pain.
With screen, everything is simple.
Sometimes you need to add line numbers to the text, which you can do with the Unix cat command. The use of the Cat command is as follows: name cat-concatenate, Copy, and print files synopsis cat [-BENRSTUV] File ... Options Cat recognizes the following options: -b Omit Line numbers to blank lines when-n option is nbsp; specified. If This option is
ChownIs a command used to set file owners and file associations in UNIX systems. Super User Permissions are required to execute this command. Only the file owner of the file group and the super user can change the file association group. If you do not have permissions, you may need to use the chgrp command to set the a
Unix more command, unixmore
[Syntax]: more [-cdflrsuw] [-number of rows] [+ number of rows] [+/mode] [file...]
[Description]: displays the file on the terminal. -- more -- is displayed at the lower left of each screen. If the file is read rather than the pipe, the percentage is displayed at the end, indicates the displayed part. Press the Enter key to roll up a line and press the Space key to roll up a
In Unix/Linux, run the Find command to search for an empty directory: find/path-depth-type d-empty www.2cto.com: find/path-depth-type f-empty find the file by name: find/path-name name_of_file find the file by extension: find/path-name "*. given_extension ": find/path-name '*. txt '-perm 644 searches for a file based on the permission attributes of the file: find/path-perm-permision_bits www.2cto.com withou
"ibase=2;obase=10000; Binary "|BC-convert binary to 16 binary (10000_b=16_d)ReadelfStringsLook for an ASCII string with a length greater than 4 in the binary file. For object file, do not find the text segment, but search all byte for other files.-A To object file also searches the text segment-Search each byte for both normal and object files--Treat each remaining parameter as a file name-O for each ASCII string found, output its offset at the same time.-T [d|o|x] output offset using decimal (
toggle selection or [exit][previous][next]>Choose Product Installation Directories:----------------------------------------Middleware Home Directory: [/weblogic/oracle/middleware]Product Installation Directories:1| WebLogic Server: [/weblogic/oracle/middleware/wlserver_10.3]2| Oracle Coherence: [/weblogic/oracle/middleware/coherence_3.7]Enter index number to select OR [exit][previous][next]>--Default, enter:The following products and JDKs would be installed:-------------------------------------
uname-R shows the kernel version being usedDateShow system date cal -Display the 2007 Calendar Table CD: Return to the previous level directorypwdShow work Pathlsviewing files in a directorymkdirDIR1 Create a call'Dir1'The directory' mkdirDir1 Dir2 Simultaneous creation of two directoriesmkdir-p/tmp/dir1/Dir2 Creating a directory treeRM-F file1 Delete a call'file1'of the file' MVDir1 New_dir Rename/move a directoryCPfile1 file2 Copy a fileCP dir/*. Copy all files in a directory to the current wo
SED usage: sed ' Command ' filename (s) displays only results without modifying the file.
1, sed ' 2,5d ' file displays files, excluding 2-5 rows, but the number of rows exceeds the actual number of files in the file does not error.
The sed '/10[1-4]/d ' file displays files, excluding rows containing 101-104.
Sed ' 2, $d ' file displays files, showing only the first row. The sed ' 2,$!d ' file displays only the other rows except the first line.
Se
Unix cp command, unixcp
[Syntax]: cp [-p] [-r] File 1 [file 2...] Target
[Description]: Set file 1 (file 2 ...) if the object is a file name, only one file can be copied. if the object is a directory, multiple files can be copied, if the target file does not exist, create this file. If yes, overwrite the previous content. If the target file is a directory, copy the file to this directory.-I will prompt
I learned a new command:PartprobeThis command can make the new disk partition take effect without restarting the operating system.
Default location:/sbin/partprobe. Related commands:Parted.
In practice, warnings are sometimes reported and partition information is not updated successfully.
Partprobe-S
Warning: warning: the kernel failed to re-read the partition table on/dev/SDA (device or resource busy ). as a result, it may not reflect all of
Tags: permissions test content Universal inittab ATI script Run SystemTurn http://blog.itpub.net/23135684/viewspace-668924/Unix general use Method 3, for deploying OSWMethod One:Edit/etc/rc.d/rc.localJoin the command you want to execute.Such as:[email protected] rc.d]# cat rc.local#!/bin/sh## this script. 'll is executed *after* all and the other init scripts.# can put your own initialization stuff in here
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.