Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Intuitive design for command line switches (nunobrito1981.blogspot.com)
1 point by nunobrito on March 3, 2016 | hide | past | favorite | 3 comments


In Windows/ReactOS one would type: dir .txt /s

> In Windows/ReactOS one would type: > dir .txt /s > In Unix/Linux this is a top answer: > find ./ -type f -name ".txt"

FYI, bash 4 / zsh allow:

ls /.txt

One thing that is often missed about first time unix users is that despite of the often obscure and often inconsistent flag syntax, the real power comes from the ability to combine commands and constructs:

rm /.txt

or find ./ -type f -name ".txt" | xargs rm (if you don't remember that find has an -exec flag)


OP here.

My apologies, was meant to say "search folder and sub-folders". If it is just to find on the current folder, the ls syntax is quite good.


my apologies, HN formatting mistake I meant the double star syntax: "<start><star>/<star>.txt"




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: