Linux Basic Commands Exercise 1

Source: Internet
Author: User

# Ls-l | grep "^d"

# Cat/etc/ssh/sshd_config | Grep-v ^#

[^XX] does not include XX

# LS-FL | grep/$

# Grep-ev "^#|^$" /etc/ssh/sshd_config

# egrep-v "^#|^$"/etc/ssh/sshd_config

# Find. -type d! -name "."

# Find. -type d!  -name "." -prune

# tree-ld 1

# Ls-l | Sed-n/^d/p

Ls-l | awk '/^d/'

# LS-LF | Sed-n '/\/$/p '

#find-o-and!

^$ Empty Line

\

# CD-

When the output of a command contains the content we need, we have to think that this command might have a corresponding parameter that directly shows what we need.

# ll-lrt/etc/Recent Time files (according to the update time, the rehearsal file is reversed)

# grep Hequan--color=auto 1.txt

# Source/etc/profile aliases Take effect

#ln Hard Link-s Soft connect directory new directory

# Find/-type f-name "*.log"-mtime +7 | Xargs rm-f

For n in ' seq 100 '; do sleep 1; echo $n >>/var/log/messages;d One

# cat-n #more #less: Set Nu:set Nonu

# RunLevel

More Less

# Ls/etc/rc.d/rc3.d/| grep sshd

# Grep-ev "^#|^$"/etc/inittab

# vi/etc/sysconfig/i18n

Echo Source Export

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>

# tar zcvf/tmp/etc.tar.gz/etc/packing Basket apples

# tar TF etc.tar.gz See

# tar vxf hequan.tar.gz-c/tmp/unpacking

#tar ZCFV hequan.tar.gz--exclude=/etc/ssh/etc/not included

# tar ZCVFX hequan.tar.gz a.txt/etc/

# tar JCVF hequan.tar.bz/etc/

# tar JXVF hequan.tar.bz

-N Incremental Packaging

# awk ' {print $ ' "$6} ' Hequan.txt

# cut-c 6-12,21-hequan.txt

# sed s#,# #g hequan.txt | awk ' {print $ ' "$6} '

Cut-d cut-F data selection,-C cut by character

# wc-l Hequan.txt

# Cat-n/etc/services | Tail-l

# sed-n ' $= '/etc/services

# awk ' {print NR} '/etc/services | Tail-l

# PS-EF

# Ps-ef | grep sshd

# Ps-ef | grep sshd | Wc-l

# Ps-ef |grep-v grep | grep sshd


Linux Basic Commands Exercise 1

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.