如何生成带日期的文件名? 在UNIX上,使用`date +%y%m%d` (`这个是键盘上~所在的那个键),例: toUCh eXP_table_name_`date +%y%m%d`.d
如何生成带日期的文件名? 在UNIX上,使用`date +%y%m%d` (`这个是键盘上~所在的那个键),例: touch exp_table_name_`date +%y%m%d`.d
需求:需要生成下面的序列号,前半部分是yyyymmdd格式的年月日时间数字,后半部分则是每天都从1顺序增长的数字,位数要固定,中间不足的补0。 在SQL Server 2000数据库中测试后通过如
#!/bin/sh # The right of usage, distribution and modification is here by granted by the author.
相信大家都注意到,制作比较讲究的系统软件的所有文件的日期都完全一样(如中文Windows 98的所有系统文件的时间都是1998-6-19 20:01),这就使得软件显得比较统一。作为个人用
执行ls -l命令时,遵守以下的规则:如果文件修改时间发生在一年以内,则只显示时间。如果文件修改时间发生在一年之前,则显示年,不显示时间。
#!/bin/sh # The right of usage, distribution and modification is here by granted by the author.
我想写这样一个脚本:ls -l看到文件日期后,如果该文件的日期是7天以前的旧文件,就执行一些操作,不知道这个脚本该如何写? 据说crontab可以实现,各位大侠有看到过么? 用 find
#!/bin/sh ls -1 |while read line do month=`echo $line|awk '{print $6}'` day=`echo $line|aw
#!/bin/sh # The right of usage, distribution and modification is here by granted by the author.