系统目录/ls命令/文件类型/alias命令

9月11日任务

 

2.1/2.2 系统目录结构

2.3 ls命令

2.4 文件类型

2.5 alias命令 

 

2.1/2.2、2.3

Xshell 4 (Build 0123)

Copyright (c) 2002-2013 NetSarang Computer, Inc. All rights reserved.

 

Type `help' to learn how to use Xshell prompt.

Xshell:\>

 

Connecting to ...

Connection established.

To escape to local shell, press 'Ctrl+Alt+]'.

 

Last login: Sat Sep  8 21:16:59 2018 from gateway

[root@centos64-01 ~]# ls /

bin   dev  home  lib64  mnt  proc  run   srv  tmp  var

boot  etc  lib   media  opt  root  sbin  sys  usr

 

[root@centos64-01 ~]# man ls

[root@centos64-01 ~]# ls -l -i -a -t -h -d^C

[root@centos64-01 ~]#

备注:ls 常用参数-l -i -a -t -h -d。

 

c294e97518db44fc9fff2e6876deb0c59c8.jpg

 

2.4

在Linux文件系统中,主要有以下几种类型的文件。

[]普通文件(regular file)

[]目录(directory)

[]链接文件(link file)

[]设备(device)

 

2.5

[root@centos64-01 ~]# alias

alias cp='cp -i'

alias egrep='egrep --color=auto'

alias fgrep='fgrep --color=auto'

alias grep='grep --color=auto'

alias l.='ls -d .* --color=auto'

alias ll='ls -l --color=auto'

alias ls='ls --color=auto'

alias mv='mv -i'

alias rm='rm -i'

alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'

[root@centos64-01 ~]# alias aming='ls -lha'

[root@centos64-01 ~]# aming

总用量 32K

dr-xr-x---.  3 root root  163 9月   4 20:41 .

dr-xr-xr-x. 17 root root  224 8月  14 18:47 ..

-rw-------.  1 root root 1.4K 8月  14 18:48 anaconda-ks.cfg

-rw-------.  1 root root 2.6K 9月   8 12:26 .bash_history

-rw-r--r--.  1 root root   18 12月 29 2013 .bash_logout

-rw-r--r--.  1 root root  176 12月 29 2013 .bash_profile

-rw-r--r--.  1 root root  176 12月 29 2013 .bashrc

-rw-r--r--.  1 root root  100 12月 29 2013 .cshrc

drwx------.  2 root root   48 8月  19 18:12 .ssh

-rw-r--r--.  1 root root  129 12月 29 2013 .tcshrc

-rw-------.  1 root root  716 9月   4 20:41 .viminfo

[root@centos64-01 ~]# which aming

alias aming='ls -lha'

    /usr/bin/ls

[root@centos64-01 ~]# unalias aming

[root@centos64-01 ~]#

 

46a7826ef960e5a7127caae086f5527ea79.jpg

转载于:https://my.oschina.net/u/3964535/blog/2048756

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值