有时候在写Shell脚本的时候需要一些临时存储数据的才做,最适合存储临时文件数据的位置就是/tmp,因为该目录中所有的内容在系统重启后就会被清空。
tempfile命令只有在基于Debian的发行版中才默认自带,比如Ubuntu,其他发行版没有这个命令。
语法格式:tempfile [参数]
常用参数:
$ | 变量 |
参考实例
用一个加带了随机数的文件名作为临时文件命名:
[[email protected] ~]# temp_file_name="/tmp/file_$RANDOM"
');mask-image:url('data:image/svg+xml;utf8,');mask-mode:alpha;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-position:center;mask-position:center;border-radius:0}}.wp-block-image :where(.has-border-color){border-style:solid}.wp-block-image :where([style*=border-top-color]){border-top-style:solid}.wp-block-image :where([style*=border-right-color]){border-right-style:solid}.wp-block-image :where([style*=border-bottom-color]){border-bottom-style:solid}.wp-block-image :where([style*=border-left-color]){border-left-style:solid}.wp-block-image :where([style*=border-width]){border-style:solid}.wp-block-image :where([style*=border-top-width]){border-top-style:solid}.wp-block-image :where([style*=border-right-width]){border-right-style:solid}.wp-block-image :where([style*=border-bottom-width]){border-bottom-style:solid}.wp-block-image :where([style*=border-left-width]){border-left-style:solid}.wp-block-image figure{margin:0}/*]]>*/
有时候在写Shell脚本的时候需要一些临时存储数据的才做,最适合存储临时文件数据的位置就是/tmp,因为该目录中所有的内容在系统重启后就会被清空。
tempfile命令只有在基于Debian的发行版中才默认自带,比如Ubuntu,其他发行版没有这个命令。
语法格式:tempfile [参数]
常用参数:
$ | 变量 |
参考实例
用一个加带了随机数的文件名作为临时文件命名:
[[email protected] ~]# temp_file_name="/tmp/file_$RANDOM"