Shell Base Command

Source: Internet
Author: User

View Files

Stat can list all information about the target file

Stat com_id.txt File: ' com_id.txt ' size:22 blocks:8 IO block:4096 Regular filedevice:fd00h/ 64768d inode:5056098 links:1access: (0644/-rw-r--r--) Uid: (0/root) Gid: (0/root) access:2016- 11-08 18:53:19.000000000 +0800modify:2016-10-24 11:34:37.000000000 +0800change:2016-10-24 11:34:37.000000000 +0800

File types listed

[[Email protected] fkshell]# file Com_id.txt com_id.txt:ASCII text

View entire file

Cat-n parameter can be numbered

More

Less is the advanced version of more


View some files

Tail

-F

--pid=pid trace file knows process PID termination

The first 10 rows are displayed by the head

Process View

Ps-efh h parameter to organize processes into layers

Top real-time process monitoring

Total amount of virtual memory used by the VIRT process

Res physical Memory

Amount of memory shared by SHR with other programs

Total CPU time that was used after the time+ process started

Global variables

[[Email protected] fkshell]# printenvhostname=v6depterm=xtermshell=/bin/bashhistsize=1000ssh_ CLIENT=*.*.*.* 49567 22SSH_TTY=/DEV/PTS/1USER=ROOTLS_COLORS=NO=00:FI=00:DI=00;34:LN=00;36:PI=40;33: so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*. Btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip =00;31:*.z=00;31:*. z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00 ; 35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:mail=/var/spool/mail/rootpath=/usr/java/jdk1.6.0_38/bin:/ usr/java/jdk1.6.0_38/jre/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/ usr/sbin:/usr/bin:/root/bin:/usr/local/swftools/bin:/usr/local/graphicsmagick/bin:/usr/local/ffmpeg/bin:/usr/ Vm/media/mplayer/bin:/usr/local/flvtools/bin:/root/bininputrc=/etc/inputrcpwd=/fkshelljava_home=/usr/java/jDk1.6.0_38lang=en_us. utf-8ssh_askpass=/usr/libexec/openssh/gnome-ssh-askpassshlvl=1home=/rootlogname=rootclasspath=:/usr/java/ jdk1.6.0_38/lib:/usr/java/jdk1.6.0_38/jre/libssh_connection=10.104.8.122 49567 10.105.0.204  22lessopen=|/usr/bin/lesspipe.sh %sg_broken_filenames=1_=/usr/bin/printenvoldpwd=/home

Set represents the set of environment variables for a particular process

[[Email protected] fkshell]# setbash=/bin/bashbash_argc= () bash_argv= () BASH_LINENO= () BASH_SOURCE = () bash_versinfo= ([0]= "3"  [1]= "2"  [2]= ""  [3]= "1"  [4]= "release"  [5]= "x86_64- Redhat-linux-gnu ") bash_version= ' 3.2.25 (1)-release ' classpath=:/usr/java/jdk1.6.0_38/lib:/usr/java/jdk1.6.0_38/ jre/libcolors=/etc/dir_colors.xtermcolumns=148dirstack= () euid=0groups= () g_broken_filenames=1histfile=/root/. bash_historyhistfilesize=1000histsize=1000home=/roothostname=v6dephosttype=x86_64ifs=$ '  \t\n ' INPUTRC=/etc /inputrcjava_home=/usr/java/jdk1.6.0_38lang=en_us. utf-8lessopen= ' |/usr/bin/lesspipe.sh %s ' lines=31logname=rootls_colors= ' no=00:fi=00:di=00;34:ln=00;36:pi= 40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00 ; 32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31 :*. zip=00;31:*.z=00;31:*. Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpM=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35: ' Machtype=x86_64-redhat-linux-gnumail=/var/spool/mail/rootmailcheck=60oldpwd=/homeopterr=1optind=1ostype= linux-gnupath=/usr/java/jdk1.6.0_38/bin:/usr/java/jdk1.6.0_38/jre/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/ usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/swftools/bin:/usr/local/ Graphicsmagick/bin:/usr/local/ffmpeg/bin:/usr/vm/media/mplayer/bin:/usr/local/flvtools/bin:/root/binpipestatus = ([0]= "0") ppid=9868prompt_command= ' printf  "\033]0;%[email protected]%s:%s\007"   "${USER}"   " ${hostname%%.*} " " ${pwd/# $HOME/~} "' ps1= ' [\[email protected]\h \w]\$  ' ps2= ' >  ' ps4= ' +  ' pwd=/fkshellshell=/bin/bashshellopts=braceexpand:emacs:hashall:histexpand:history:interactive-comments : monitorshlvl=1ssh_askpass=/usr/libexec/openssh/gnome-ssh-askpassssh_client= ' 10.104.8.122 49567 22 ' Ssh_connection= ' 10.104.8.122 49567 10.105.0.204 22 ' Ssh_tty=/dev/pts/1term=xtermuid=0user=root_=/rootconsoletype=ptytmpid=0 

Setting Global environment variables

Export

Removing environment variables

unset

Positioning System Environment variables

/etc/profile

/etc/profile.d

Vim

H Move Left

J Next Line

K Previous Line

L Move Right

G Move to last line

GG Move to First line

NUMG moving to the first few lines


x Delete Cursor Position character

DD deletes the cursor in the row

DW Delete Word at current cursor position

d$ Delete all the current cursor position to the end of the line

A append the data to the cursor


Shell Base Command

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.