2020-9

一、参考网址

  1、svn命令之恢复误删的文件

  2、arp -a和arp -d分别是什么意思

  3、计算机网络基础知识总结

  4、sem_timedwait等待毫秒

  5、start-stop-daemon命令

  6、Bash 脚本 set 命令教程(阮一峰)

  7、c标准库和操作系统api的关系是怎样的?

  8、Linux TTY/PTS概述

  9、用scanf()函数输入带空格的字符串

  10、c语言中输入包含空格的字符串:scanf("%[^ ]",str) vs gets(str)

二、知识点

  1、嵌入式开发板的启动脚本:/etc/init.d/rcS

#!/bin/sh


# Start all init scripts in /etc/init.d
# executing them in numerical order.
#
for i in /etc/init.d/S??* ;do

     # Ignore dangling symlinks (if any).
     [ ! -f "$i" ] && continue

     case "$i" in
    *.sh)
        # Source shell script for speed.
        (
        trap - INT QUIT TSTP
        set start
        . $i
        )
        ;;
    *)
        # No sh extension, so fork subprocess.
        $i start
        ;;
    esac
done

  2、嵌入式开发板的停止脚本/etc/init.d/rcK

#!/bin/sh


# Stop all init scripts in /etc/init.d
# executing them in reversed numerical order.
#
for i in $(ls -r /etc/init.d/S??*) ;do

     # Ignore dangling symlinks (if any).
     [ ! -f "$i" ] && continue

     case "$i" in
    *.sh)
        # Source shell script for speed.
        (
        trap - INT QUIT TSTP
        set stop
        . $i
        )
        ;;
    *)
        # No sh extension, so fork subprocess.
        $i stop
        ;;
    esac
done

   3、查看udhcpd已经分配的地址

dumpleases -f /var/tmp/udhcpd.leases

  

  4、查看udhcpd的分配地址范围

cat /etc/udhcpd.conf 

       

   5、c标准库和操作系统api的关系是怎样的?截图如下:

原文地址:https://www.cnblogs.com/shanyu20/p/13614240.html