Linux Commands Commonly Used by DevOps Engneers

Source: Internet
Author: User
Keywords devops linux commands important linux commands for devops important linux commands for devops

This article summarizes commonly used Devops linux commands, including: online query and help commands, file and directory operation commands, view files and content processing commands, etc.

Online query and help commands (2)

man
Check the command help, command dictionary, and more complex info, but it is not commonly used.

help
Check the help of Linux built-in commands, such as cd command. —Help can also be used


File and directory operation commands (18)

ls
Full spell list, the function is to list the contents of the directory and its content attribute information. Commonly used is ll

cd
Quanpin change directory, the function is to switch from the current working directory to the specified working directory.

cp
Quanpin copy, its function is to copy files or directories.

find
The meaning of search is used to search the directory and the files in the directory.

mkdir
Quan spell make directories, its function is to create directories.

mv
Quanpin move, its function is to move or rename files.

pwd
Quan spell print working directory, its function is to display the absolute path of the current working directory.

rename
Used to rename files.

rm
Quanpin remove, its function is to delete one or more files or directories.

rmdir
Quan spell remove empty directories, the function is to delete empty directories.

touc
Create a new empty file and change the timestamp attribute of the existing file.

tree
The function is to display the contents of the directory in a tree structure.

basename
Displays the file name or directory name.

dirname
Display file or directory path.

chattr
Change the extended attributes of the file.

lsattr
View file extension properties.

file
Displays the type of file.

md5sum
Calculate and verify the MD5 value of the file.

View file and content processing commands (21)

cat
Quanpin concatenate, the function is used to connect multiple files and print to the screen output or redirect to the specified file.

tac
tac is the reverse spelling of cat, so the function of the command is to display the contents of the file in reverse.

more
The file content is displayed in pages.

less
Pagination shows the contents of the file, the opposite usage of the more command.

head
Display the header of the file content.

tail
Display the end of the file content. Commonly used is tail-f to dynamically display the content of the file appended

cut
Separate and output each line of the file according to the specified separator.

split
Split the file into different small fragments.

paste
Consolidate file content by line.

sort
Sort the text content of the file.

uniq
Remove duplicate lines. oldboy

wc
Count the number of lines, words, or bytes in the file.

iconv
Convert the encoding format of the file.

dos2unix
Convert DOS format files to UNIX format.

diff
Full spell difference, compare the difference of files, commonly used in text files.

vimdiff
Command line visual file comparison tool, commonly used for text files.

rev
Reverse output file content.

grep/egrep
Filter the string, the third of the three Musketeers.

join
Merge by the same field of the two files.

tr
Replace or delete characters.

vi/vim
Command line text editor.

File compression and decompression commands (4)

tar
Pack and compress. oldboy

unzip
unzip files.

gzip
gzip compression tool.

zip
Compression tools.

Information display commands (11)

uname
Commands that display information about the operating system.

hostname
Display or set the host name of the current system.

dmesg
Display start-up information for diagnosing system failure.

uptime
Display system running time and load.

stat
Display the status of a file or file system.

du
Calculate disk space usage.

df
Reports on the usage of file system disk space.

top
Real-time display of system resource usage.

free
View system memory.

date
Display and set the system time.

cal
View time information such as calendar.

Search file command (4)

which
Find the binary command, according to the environment variable PATH path.

find
Traverse from disk to find files or directories.

whereis
Find the binary command, according to the environment variable PATH path.

locate
Find the command from the database (/var/lib/mlocate/mlocate.db) and use updatedb to update the library.
Related Article

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.