登录 | 首页 -> 华新鲜事 -> 技术の宅 | 切换到:传统版 / sForum | 树形列表
miss my unix babe...
<<始页  [1]  末页>> 

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!
[庸人 (12-23 15:45, Long long ago)] [ 传统版 | sForum ][登录后回复]1楼

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
[SmellsLikeTeenSpirit (12-23 16:45, Long long ago)] [ 传统版 | sForum ][登录后回复]2楼

(引用 SmellsLikeTeenSpirit:dir /o:-d or dir /t:wwhen it comes to Microsoft's product, their product documentations are the best reousrces to consult, inste...)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.
[庸人 (12-23 20:29, Long long ago)] [ 传统版 | sForum ][登录后回复]3楼

(引用 庸人:thank you, but it doesn't solve my problemi only need one line as output. imagine a directory contains millions of files, no poi...)dir /p/o:-dthis command shows a screen. i don't really know how to display one file, perhaps you need to use SORT command[SmellsLikeTeenSpirit (12-23 20:54, Long long ago)] [ 传统版 | sForum ][登录后回复]4楼

Program a utility yourself bahSimple text processing, nothing difficult.
Those Unix commands are also nothing but a compiled program
[香陵居士 (12-26 20:55, Long long ago)] [ 传统版 | sForum ][登录后回复]5楼

http://unxutils.sourceforge.net/http://unxutils.sourceforge.net/[kronecker (12-29 21:59, Long long ago)] [ 传统版 | sForum ][登录后回复]6楼

(引用 kronecker:http://unxutils.sourceforge.net/http://unxutils.sourceforge.net/)是个不错的东东,不过我们公司有MKS Toolkits的license乐其实要是找unix emulator就不用这么费劲了,我就是想看看dos自己能不能做到这些……[庸人 (12-30 11:44, Long long ago)] [ 传统版 | sForum ][登录后回复]7楼


<<始页  [1]  末页>> 
登录 | 首页 -> 华新鲜事 -> 技术の宅 | [刷新本页] | 切换到:传统版 / sForum