zoukankan      html  css  js  c++  java
  • 基础知识及命令(1)

    [root@tyzz ~]# mkdir -pv 1/2/3
    mkdir: created directory '1'
    mkdir: created directory '1/2'
    mkdir: created directory '1/2/3'
    
    -p 递归 创建多级目录
    -v 显示过程
    [root@tyzz ~]# rmdir -pv 1/2/3/
    rmdir: removing directory, '1/2/3/'
    rmdir: removing directory, '1/2'
    rmdir: removing directory, '1'
    [root@tyzz ~]# cp -rv /boot/grub .
    '/boot/grub' -> './grub'
    '/boot/grub/splash.xpm.gz' -> './grub/splash.xpm.gz'
    [root@tyzz ~]# ls
    grub
    -R, -r, --recursive  复制目录及目录内的所有项目
    [root@tyzz ~]# mv grub/ asd
    [root@tyzz ~]# ls
    asd
    [root@tyzz ~]# ls -lh 1.txt 
    -rw-r--r-- 1 root root 1.3K Feb 19 20:04 1.txt
    - 普通文件
    d 目录文件
    s 进程通讯
    c 字符设备
    b 块设备】
    l 软连接文件(类似于快捷方式)
    rxw 读写执行
    ls -lh 查看KB
    文件查看命令
    cat 直接查看
    tac 查看文件从尾部开始
    more 分屏查看 回车键换屏
    less 分屏查看 回车键换屏 空格键换行 可用上下左右键
    chmod 更改权限
    权限范围:
    u :目录或者文件的当前的用户
    g :目录或者文件的当前的群组
    o :除了目录或者文件的当前用户或群组之外的用户或者群组
    a :所有的用户及群组
    
    权限代号:
    r :读权限,用数字4表示
    w :写权限,用数字2表示
    x :执行权限,用数字1表示
    - :删除权限,用数字0表示
    s :特殊权限 
    
    对一个目录及其子目录所有文件添加权限 
    命令:
    chmod -R u+x test4
    
    umask 0022
    文件666
    目录777
    chown
    改变拥有者和群组
    
    命令:
    chown mail:mail log2012.log
    
    改变指定目录以及其子目录下的所有文件的拥有者和群组 
    命令:
    chown -R -v root:mail test6
    -R 递归
    -v 显示过程
    快捷键使用

    Ctrl+l =clear 清屏

    Ctrl + d =logout=exit 退出终端

    ctrl+u 删除光标前面的输入

    Ctrl+k 删除光标后面的输入

    Ctrl + c 停止和取消错误命令的运行(命令未运行之前Ctrl+c换行输入)

    Ctrl + z 暂停任务

    fg 恢复任务

    Ctrl+s 锁定屏幕

    Ctrl+q 解锁屏幕

  • 相关阅读:
    Oracle中的函数——Row_Number()
    Oracle中的函数——Concat()
    EM13C添加agent记录两个报错
    优化SQL集一
    只能在工作时间内更新某表
    WARNING OGG-01519
    plsql developer连接oracle 12.2报错 ora-28040 No matching authentication protocol
    Oracle 12.2 报错:ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_7458"
    ORA-04021: timeout occurred while waiting to lock object
    记一次 oracle 12.2 RAC : Transaction recovery: lock conflict caught and ignored
  • 原文地址:https://www.cnblogs.com/aallenn/p/6700589.html
Copyright © 2011-2022 走看看