Chinaunix
标题:
【求助】cmd下如何获取cpu的核心个数,把它存为一个变量,在bat里使用?
[打印本页]
作者:
以泪洗面
时间:
2012-05-25 16:56
标题:
【求助】cmd下如何获取cpu的核心个数,把它存为一个变量,在bat里使用?
1. cmd下如何获取cpu的核心个数,把它存为一个变量,在bat里使用?
2. 现在想把一堆.log的文件拼接起来。
2.1. 拼接时文件内容之间要塞点东西;
2.2. 拼接顺序默认是以文件名排序的,怎么样以修改时间排序?
我大概是这样子写的。请帮我改改,谢谢了!
for i in -t *.f; do
echo $i > tmp
cat tmp $i >> $ALL
echo ------------------------------------------- >> $ALL
rm -f tmp
done
复制代码
作者:
rdcwayx
时间:
2012-05-25 19:21
ls -ctr
作者:
Shell_HAT
时间:
2012-05-25 21:14
@echo off
echo %number_of_processors%
pause
复制代码
作者:
ulovko
时间:
2012-05-25 21:28
-c Use time when file status was last changed for sorting or printing.
-r Reverse the order of the sort.
-t Sort by time modified (most recently modified first) before sort‐
ing the operands in lexicographical order.
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2