miss my unix babe...
登录 | 论坛导航 -> 华新鲜事 -> 技术の宅 | 本帖共有 7 楼,分 1 页, 当前显示第 1 页 : 本帖树形列表 : 刷新 : 返回上一页
<<始页  [1]  末页>>
作者:庸人 (等级:8 - 融会贯通,发帖:2749) 发表:2004-12-23 15:45:36  楼主  关注此帖
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!
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:SmellsLikeTeenSpirit (等级:11 - 出神入化,发帖:6371) 发表:2004-12-23 16:45:38  2楼
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
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:庸人 (等级:8 - 融会贯通,发帖:2749) 发表:2004-12-23 20:29:31  3楼
dir /o:-d or dir /t:wwhen 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
thank you, but it doesn't solve my problem
i 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.
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:SmellsLikeTeenSpirit (等级:11 - 出神入化,发帖:6371) 发表:2004-12-23 20:54:32  4楼
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版只看此人从这里展开收起列表
作者:香陵居士 (等级:16 - 好恐怖呀,发帖:22662) 发表:2004-12-26 20:55:17  5楼
Program a utility yourself bah
Simple text processing, nothing difficult.
Those Unix commands are also nothing but a compiled program
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:kronecker (等级:2 - 初出茅庐,发帖:112) 发表:2004-12-29 21:59:25  6楼
http://unxutils.sourceforge.net/
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:庸人 (等级:8 - 融会贯通,发帖:2749) 发表:2004-12-30 11:44:30  7楼
http://unxutils.sourceforge.net/http://unxutils.sourceforge.net/
是个不错的东东,不过我们公司有MKS Toolkits的license乐
其实要是找unix emulator就不用这么费劲了,我就是想看看dos自己能不能做到这些……
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
论坛导航 -> 华新鲜事 -> 技术の宅 | 返回上一页 | 本主题共有 7 篇文章,分 1 页, 当前显示第 1 页 | 回到顶部
<<始页  [1]  末页>>

请登录后回复:帐号   密码