• REPL


    REPL(Read Eval Print Loop:交互式解释器) 表示一个电脑的环境,类似 Window 系统的终端或 Unix/Linux shell,我们可以在终端中输入命令,并接收系统的响应。

    交互式目录

    [root@localhost ~]# ntpq
    [root@localhost ~]# sqlite3
    [root@localhost ~]# mysql -p
    [root@localhost ~]# php -a
    [root@localhost ~]# python
    [root@localhost ~]# mail
    [root@localhost ~]# yum shell
    [root@localhost ~]# virsh
    [root@localhost ~]# debugfs
    [root@localhost ~]# gdb
    [root@localhost ~]# ./redis-cli
    [root@localhost ~]# ./mongo
    [root@localhost ~]# bc
    [root@localhost ~]# node(node.js)

    [oracle@localhost ]$ sqlplus / as sysdba
    [root@localhost ~]# ntpq
    ntpq> peers
         remote           refid      st t when poll reach   delay   offset  jitter
    ==============================================================================
    +gus.buptnet.edu 202.112.10.60    3 u   17   64  377   88.144   32.547   5.601
    +ntp.verd.co.id  202.162.32.12    3 u   85   64  336  209.770    4.300 167.134
    *ktdns.cdnetwork 131.107.13.100   2 u   10   64  377   70.834   33.196  20.738
    ntpq> ?
    ntpq commands:
    :config          delay            mreadvar         readlist
    addvars          exit             mrl              readvar
    associations     help             mrv              rl
    authenticate     host             ntpversion       rmvars
    ntpq> q
    [root@localhost ~]#
    
    [root@localhost ~]# sqlite3
    SQLite version 3.6.20
    Enter ".help" for instructions
    Enter SQL statements terminated with a ";"
    sqlite> .help
    .backup ?DB? FILE      Backup DB (default "main") to FILE
    .bail ON|OFF           Stop after hitting an error.  Default OFF
    .databases             List names and files of attached databases
    .dump ?TABLE? ...      Dump the database in an SQL text format
    sqlite> .quit
    [root@localhost ~]#
    
    [root@84-monitor ~]# mysql -p
    Enter password:
    Welcome to the MySQL monitor.  Commands end with ; or g.
    Your MySQL connection id is 1119677
    Server version: 5.1.73 Source distribution
    mysql> ?
    mysql> quit
    Bye
    [root@84-monitor ~]#
    
    -bash-3.2$ sqlplus / as sysdba
    
    SQL*Plus: Release 11.2.0.1.0 Production on Thu Feb 26 15:17:18 2015
    
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
    Data Mining and Real Application Testing options
    
    SQL> ?
    
     HELP
     ----
    
     Accesses this command line help system. Enter HELP INDEX or ? INDEX
     for a list of topics.
    
     You can view SQL*Plus resources at
         http://www.oracle.com/technology/tech/sql_plus/
     and the Oracle Database Library at
         http://www.oracle.com/technology/documentation/
    
     HELP|? [topic]
    
    
    SQL> quit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
    Data Mining and Real Application Testing options
    -bash-3.2$
    
    [root@84-monitor ~]# php -a
    Interactive shell
    
    php >
    php > b    tab两次
    BadFunctionCallException  BadMethodCallException    base64_decode             base64_encode             base_convert              basename
    bin2hex                   bind_textdomain_codeset   bindec                    bindtextdomain            bzclose                   bzcompress
    bzdecompress              bzerrno                   bzerror                   bzerrstr                  bzflush                   bzread
    bzwrite                   bzopen
    php > b
    php > quit
    [root@84-monitor ~]#
    
    [root@84-monitor ~]# python
    Python 2.6.6 (r266:84292, Jan 22 2014, 09:42:36)
    [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> help
    Type help() for interactive help, or help(object) for help about object.
    >>> help()
    
    Welcome to Python 2.6!  This is the online help utility.
    
    If this is your first time using Python, you should definitely check out
    the tutorial on the Internet at http://docs.python.org/tutorial/.
    
    Enter the name of any module, keyword, or topic to get help on writing
    Python programs and using Python modules.  To quit this help utility and
    return to the interpreter, just type "quit".
    
    To get a list of available modules, keywords, or topics, type "modules",
    "keywords", or "topics".  Each module also comes with a one-line summary
    of what it does; to list the modules whose summaries contain a given word
    such as "spam", type "modules spam".
    
    help> q
    
    You are now leaving help and returning to the Python interpreter.
    If you want to ask for help on a particular object directly from the
    interpreter, you can type "help(object)".  Executing "help('string')"
    has the same effect as typing a particular string at the help> prompt.
    >>> exit()
    [root@84-monitor ~]#

    [root@host02 ~]# mail
    Heirloom Mail version 12.4 7/29/08.  Type ? for help.
    "/var/spool/mail/root": 6 messages 1 unread
        1 Cron Daemon           Thu Nov  8 17:07  22/791   "Cron <root@8A_2> /usr/local/nagios/cache-bin/client.sh localhost"
    >U  2 Cron Daemon           Thu Nov  8 17:08  22/790   "Cron <root@8A_2> /usr/local/nagios/cache-bin/client.sh localhost"

    [root@84-monitor monitor]# yum shell
    Loaded plugins: fastestmirror
    Setting up Yum Shell
    > ?
    Usage: yum [options] COMMAND

    [root@kvm1 qemu]# virsh
    Welcome to virsh, the virtualization interactive terminal.

    Type:  'help' for help with commands
           'quit' to quit

    virsh #

    [root@104-c6 ~]# debugfs
    debugfs 1.41.12 (17-May-2010)
    debugfs:
    debugfs:  help
    Available debugfs requests:

    show_debugfs_params, params
                             Show debugfs parameters
    open_filesys, open       Open a filesystem
    close_filesys, close     Close the filesystem
    feature, features        Set/print superblock features
    dirty_filesys, dirty     Mark the filesystem as dirty
    init_filesys             Initialize a filesystem (DESTROYS DATA)
    show_super_stats, stats  Show superblock statistics
    ncheck                   Do inode->name translation
    icheck                   Do block->inode translation
    change_root_directory, chroot
                             Change root directory
    change_working_directory, cd
                             Change working directory
    list_directory, ls       List directory
    show_inode_info, stat    Show inode information
    dump_extents, extents, ex
                             Dump extents information
    link, ln                 Create directory link
    unlink                   Delete a directory link
    mkdir                    Create a directory
    rmdir                    Remove a directory
    rm                       Remove a file (unlink and kill_file, if appropriate)
    kill_file                Deallocate an inode and its blocks
    clri                     Clear an inode's contents
    freei                    Clear an inode's in-use flag

    [root@localhost src]# ./redis-cli
    127.0.0.1:6379> CONFIG SET protected-mode no
    OK
    127.0.0.1:6379> set aa bb
    OK
    127.0.0.1:6379> set ee 11
    OK
    127.0.0.1:6379> quit
    [root@localhost src]#

    [root@localhost ~]# gdb
  • 相关阅读:
    jquery常用获取属性的方法有哪些(attr prop区别)
    Java中 List、Set、Map 之间的区别
    mysql查询语句where后面加if判断
    mysql if 排序_MySQL ORDER BY IF() 条件排序
    Java 如何逆向遍历一个 List
    解决java.util.concurrent.RejectedExecutionException(Java多线程问题)
    list,map,set的区别
    Java8 List去掉重复对象以及保证添加顺序
    java 常用的几种集合类总结
    浅析Pinia的简单使用
  • 原文地址:https://www.cnblogs.com/createyuan/p/4301395.html
Copyright © 2020-2023  润新知