杂技

Posted on 2006年09月20日. Filed under: 未分类 |

辛辛苦苦写了半天,居然没存下来,我倒。。。
 
1. List all the files under a directory with only file names (no directory included)
   Windows/DOS:
     dir /A-D /B (non-recursively)
     dir /A-D /B/S (recursively)
   HP-UX:
     find /usr -type f -print (recursive)
     find /usr -type f -name ‘z*’ -print (list files with pathname starting with ‘z’)
 
2. Filter all the lines which contain a certain string
   HP-UX:
    cat /etc/passwd |grep sting
    DOS:
    ??
 
3. Filter all the lines which DO NOT contain a certain string
   HP-UX:
    cat /etc/passwd |grep -v sting
    DOS:
    ??
 
Advertisements

Make a Comment

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

3条回应 to “杂技”

RSS Feed for Sting's Home Comments RSS Feed

DOS上叫findstr

??what’s the purpose??

In case you want to do something with all the files…


Where's The Comment Form?

Liked it here?
Why not try sites on the blogroll...

%d 博主赞过: