LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   list command question (https://www.linuxquestions.org/questions/linux-newbie-8/list-command-question-788952/)

bn48 02-13-2010 06:23 PM

list command question
 
What is the list command that will display every directory and filename that begins with "BN" including hidden files?

bret381 02-13-2010 06:33 PM

you will have be root

Code:

su
cd /
ls -R | grep "BN" | less


catkin 02-13-2010 10:40 PM

Alternatively, as root
Code:

find / -type f -name 'BN*'
If you are only interested in files accessible to the current user then
Code:

find / -type f -name 'BN*' 2>/dev/null
The 2>/dev/null suppresses error messages about find not being able to read some parts of the file system(s).

divyashree 02-14-2010 03:55 AM

Quote:

Originally Posted by bn48 (Post 3862906)
What is the list command that will display every directory and filename that begins with "BN" including hidden files?

Code:

cd /
Code:

ls -Ra | grep ^BN
Now check everyfile start with BN will be displayed .


All times are GMT -5. The time now is 06:12 PM.