SpareNet Servers Advertising & Link Exchange

اطلاعیه

بستن
هیچ اطلاعیه ای هنوز ایجاد نشده است .

Copy the content/file to all subdirectory in a directory using terminal

بستن
X
 
  • فیلتر
  • زمان
  • نمایش
پاک کردن همه
نوشته‌های جدید

  • Copy the content/file to all subdirectory in a directory using terminal

    How to put a file in the current working directory in all subfolders (and maybe their subfolders, depending on what you want to do)

    This will put the file in all of the subfolders, but not their subfolders:​

    1 copy in 1 sub dir

    کد:
    for d in */; do cp water.txt "$d"; done
    copy in all directory
    Mass Defacing

    کد:
    for d in **/*/; do cp /home/site.com/public_html/irh.txt "$d"; done
    ​

    and make file in all direcoty 10 file

    کد:
    for d in **/*/; do touch $d/file{1..10}.doc; done
    ویرایش توسط SafeMaster : https://www.iranhack.com/forum/member/3631-safemaster در ساعت 02-11-2023, 12:28 PM
    -----------------------------SAFE MASTER---------------------------
    تاپیک هکر های تازه وارد
صبر کنید ..
X