مدیریت سرورها

آموزش مدیریت سرورهای لینوکس و ویندوز

مدیریت سرورها

آموزش مدیریت سرورهای لینوکس و ویندوز

سایت در باره انواع آموزشها در زمینه IT می باشد.
مانند: لینوکس، ویندوز، سیسکو، میکروتیک، طراحی وب
به دلیل شخصی بودن وبلاگ ارائه مطالب متفرقه در آن بلامانع است.
با تشکر

طبقه بندی موضوعی

Delete All Files in a Directory Except One or Few Files with Extensions

شنبه, ۷ آبان ۱۴۰۱، ۰۸:۳۷ ب.ظ

To use them, enable the extglob shell option as follows:

# shopt -s extglob

1. To delete all files in a directory except filename, type the command below:

$ rm -v !("filename")

2. To delete all files with the exception of filename1 and filename2:

$ rm -v !("filename1"|"filename2") 

3. The example below shows how to remove all files other than all .zip files interactively:

$ rm -i !(*.zip)

4. Next, you can delete all files in a directory apart from all .zip and .odt files as follows, while displaying what is being done:

$ rm -v !(*.zip|*.odt)

Once you have all the required commands, turn off the extglob shell option like so:

$ shopt -u extglob

 

 

 

  • طاهر ضیائی

linux

لینوکس

نظرات  (۰)

هیچ نظری هنوز ثبت نشده است

ارسال نظر

ارسال نظر آزاد است، اما اگر قبلا در بیان ثبت نام کرده اید می توانید ابتدا وارد شوید.
شما میتوانید از این تگهای html استفاده کنید:
<b> یا <strong>، <em> یا <i>، <u>، <strike> یا <s>، <sup>، <sub>، <blockquote>، <code>، <pre>، <hr>، <br>، <p>، <a href="" title="">، <span style="">، <div align="">