![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Quote:
Code:
# ls -ltr *.log.[1-9] |
|
|||||
|
thanks now i m able to get 1st kinf of files.........
but 1st kind of files are also like this file1.log.123 file1.log.12 file1.log.10 ls -ltr *.log.[1-9]--------its grepping those file which have till 9,even i wnt to grep all the numbers like for example file1.log.12. |
|
||||
|
Quote:
Code:
ls -ltr *.log.? *.log.?? *.log.??? or Code:
ls -ltr *.log.[0-9]* or just Code:
ls -ltr *.log.[0-9] *.log.[0-9] [0-9] *.log.[0-9] [0-9][0-9] If you have other more advanced criteria, then the above doesn't really suit your needs.... |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|