dir /o:-d or dir /t:w
登录 | 论坛导航 -> 华新鲜事 -> 技术の宅 | 本帖共有 2 楼,分 1 页, 当前显示第 1 页 : 本帖树形列表 : 刷新 : 返回上一页
<<始页  [1]  末页>>
作者:SmellsLikeTeenSpirit (等级:11 - 出神入化,发帖:6371) 发表:2004-12-23 16:45:38  楼主  关注此帖
miss my unix babe...could anyone here give me a resource (book or web) so that i can learn Dos script as a UNIX programmer? i'm stuck at a damn simple command, in UNIX we can do: ls -t | tail -n 1 get the latest modified file in this directory. But, i cannot find the corresponding command in Dos, simply becoz there is no "tail" in dos :( thank you!
dir /o:-d or dir /t:w
when it comes to Microsoft's product, their product documentations are the best reousrces to consult, instead of google.

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/sort.mspx
War is peace.
Freedom is slavery.
Ignorance is strength.
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版所有回复从这里展开收起列表
作者:SmellsLikeTeenSpirit (等级:11 - 出神入化,发帖:6371) 发表:2004-12-23 20:54:32  2楼
thank you, but it doesn't solve my problemi only need one line as output. imagine a directory contains millions of files, no point to waste time on displaying the rest... there's some tool kits provide by MS hv tail function, but i'd better make sure i don't relie on some extension applications to finish my script.
dir /p/o:-d
this command shows a screen. i don't really know how to display one file, perhaps you need to use SORT command
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版所有回复从这里展开收起列表
论坛导航 -> 华新鲜事 -> 技术の宅 | 返回上一页 | 本主题共有 2 篇文章,分 1 页, 当前显示第 1 页 | 回到顶部
<<始页  [1]  末页>>

请登录后回复:帐号   密码