|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
List all files that contain an underscore
Hi,
I was wondering if anyone knew how to recursively list all files and folders that contain an underscore? I'm looking to replace underscores in file and folder names with a hyphen and I am looking for an easy way to get a listing of the files I will need to change. Thanks so much for your help! |
|
#2
|
|||
|
|||
|
you can use find and pipe the output to egrep searching for the pattern you need. That will give you your list.
__________________
-- I'll provide you with reference points; if they dont work, refer to something else. My personal site: Basic geek randomness |
|
#3
|
|||
|
|||
|
I think you can do it directly with find:
Code:
find . -name '*_*' -print
__________________
Need Java help? Want to help people who do? Sit down with a cup of Java at the hotjoe forums. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > List all files that contain an underscore |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|