I'm trying to view the files in the linux (xubuntu) terminal (like this command: ls
).
Is there a way to do it with the command grep
? Thanks for helpers.
You can use recursive ( -r
) and only filename ( -l
)
grep -r . -l
You can set a directory action ( -d skip
) to only grep files in a directory
grep -r . -d skip -l *
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.