Jump to content

wildcard expansion bug?


crp

Recommended Posts

[root@rh5 old]# ls -ltr *[s-U].ps
-bash: /bin/ls: Argument list too long
[root@rh5 old]# ls -ltr *S.ps
ls: *S.ps: No such file or directory
[root@rh5 old]# ls -ltr *T.ps
ls: *T.ps: No such file or directory
[root@rh5 old]# ls -ltr *U.ps
ls: *U.ps: No such file or directory
[root@rh5 old]# ls -l *[s-U].ps
-bash: /bin/ls: Argument list too long
ls: *S.ps: No such file or directory
You have new mail in /var/spool/mail/root
[root@rh5 old]# ls -l *T.ps
ls: *T.ps: No such file or directory
[root@rh5 old]# ls -l *U.ps
ls: *U.ps: No such file or directory

Can anyone explain this? provide a work-around?

Link to comment
Share on other sites

THIS may answer your question.

That is what I did after the S-U said too many.

hmm,

the echo trick worked for some things.

 

How can i use the echo *| to check to see if file is older than 95 days and delete it if so?

(basically, how do i replicate functionalaty of find *[s-U].ps -ctime +135 | xargs rm)

Edited by crp
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...