小编Win*_*n.T的帖子

这些用于关闭 Linux 服务器的命令有什么区别?

阅读“Halt 和 Shutdown 命令有什么区别?” ,我通常知道命令 shutdown 有什么作用,有或没有 -h/-r 选项。

“halt”命令执行系统断电到系统的运行级别 0。

“shutdown”命令在不使用 -h 或 -r 命令的情况下将系统断电至运行级别 1。

命令 "poweroff" 进入运行级别 0 或 1 怎么样?这是这三个命令之间唯一的主要区别吗?

shutdown rhel

78
推荐指数
2
解决办法
3万
查看次数

Bash - 逐行回显,忽略行之间的空间

我已经阅读了以下帖子: bash - 用新行替换空格,但它无助于解决我的问题。

   [My Directory]

[root@testlabs Config]# ls 
Archive Backup_Files
config_file.tgz
hostname1-config.uac
hostname2-config.uac
hostname3-config.uac
My-config_17Oct2014.tgz
non_extension-config_file1
non_extension-config_file2
[root@testlabs Config]#
Run Code Online (Sandbox Code Playgroud)

我需要从文件中回显 MD5 校验和结果列表。我可以这样做:

##IDENTIFY MD5 CHECKSUM##

 //To output the md5sum of the original file with a correct format to a temp file [md5<space><space>file_name]
ls $FULL_FILE_NAME | md5sum  $FULL_FILE_NAME > /tmp/md5sum.tmp

//To compare the md5sum of the orignal file with the md5sum of the backup copies in the archive directory
ls $CONFIG_ARCHIVE_DIR | grep -i --text $CONFIG_FILE_HOSTNAME-$FILE_TIMESTAMP.tgz | md5sum -c …
Run Code Online (Sandbox Code Playgroud)

bash shell-script echo text-processing

3
推荐指数
1
解决办法
3059
查看次数

标签 统计

bash ×1

echo ×1

rhel ×1

shell-script ×1

shutdown ×1

text-processing ×1