How do you show file names in Linux?

Nguyễn Trà

New member
How do you show file names in Linux?
Answer
Grep From Files and Display the File Name On Linux or Unix System
  1. grep “word” filename grep root /etc/*
  2. grep -l “string” filename grep -l root /etc/*
  3. grep -L “word” filename grep -L root /etc/*
  4. ## get filenames ## files=$(grep -l -R ‘http://www.cyberciti.biz’ . )
 

Tìm kiếm

Back
Top