查看: 1675|回复: 0

[教程] 【一网打尽】Raspberry Pi Course Week 4 – Day 2 (Basic Commands)

[复制链接]
  • TA的每日心情
    开心
    2016-8-4 10:56
  • 签到天数: 242 天

    连续签到: 1 天

    [LV.8]以坛为家I

    发表于 2015-3-28 12:45:08 | 显示全部楼层 |阅读模式
    分享到:

    The following is a basic that the terminal will pass to the operating system and perform the action.  Commands can also use flags in the form of – followed by a letter.  This extends the capability of the command.

    Enter the following command.

    $ ls

    This will list any files in the current directory. These commands can be extended by using flags.  A flag is an additional option to the command which allows it to perform additional functions.  For example enter the following.

    $ ls -F

    /Desktop             /Downloads       /Music                  MyTextFile.txt                  MyProgram.py

    The forward slash at the beginning of the file indicates that this is a folder. Desktop, Downloads & Music are all folders but MyTextFile.txt and MyProgram.py are files.

    Enter the following command.

    $ ls -l

    This flag will list the files in a longer format which include the permissions for the files, who owns the file and the date that it was created.  Permissions are indicated by the

    drwxr-xr-x

    Permission will be explained later along with file ownership.  You can also combine flags to give you additional results.  Enter the following.

    $ ls -lF

    This will list the files in long format and will also display the forward slash / to indicate folders.

    You can use the following flags to display more information.

    -d        list the name of the current directory

    -F        show directories with a trailing ‘/’

      -a        List the hidden files.

    -g        show group ownership of file in long listing

    -l        Displays details in a long format about files and directories.

    -t        Sort by time modified.

    -R        Displays all subdirectories.

    -i        print the inode number of each file


    To expand on what you have already learned enter the following command.

    $ clear

    This command will clear the terminal window and the date command will display the current date.  Enter the command.

    $ date

    Enter the following command to display some information about the system.

    $ uname -a

    Another great little feature of the terminal is its history.  By pressing the up arrow key, it will allow you to browse the commands that you have previously entered.


    回复

    使用道具 举报

    您需要登录后才可以回帖 注册/登录

    本版积分规则

    关闭

    站长推荐上一条 /2 下一条



    手机版|小黑屋|与非网

    GMT+8, 2024-3-29 07:05 , Processed in 0.102289 second(s), 15 queries , MemCache On.

    ICP经营许可证 苏B2-20140176  苏ICP备14012660号-2   苏州灵动帧格网络科技有限公司 版权所有.

    苏公网安备 32059002001037号

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.