perintah linux copy semua file dalam direktory extenstion tertentu

Asbabuttulis, sebab-sebab nulis ini tulisan, ketika mau mencari semua file yang berekstensi *.sql pada suatu folder, yang mana dalam folder tersebut terdapat banyak folder-folder.

Bimsillah

q> googling ketemu ini [1]

q> Testing

find /home/saifi/Documents/DIMS/DIMS41/Patch-DIMS4.1/ -type f | grep -i sql$ | xargs -i cp {} /home/saifi/Desktop/sqldims/

eksentsi file =
*.sql

sumber folder yang akan dicari =
/home/saifi/Documents/DIMS/DIMS41/Patch-DIMS4.1/

tujuan hasil copy :
/home/saifi/Desktop/sqldims/

q> Hasil :
Selection_450

Alhamdulillah

sumber
[1] http://superuser.com/questions/312348/linux-copy-all-files-matching-pattern-from-dir-and-subdirs-into-a-single-dir

Published by

saifiahmada

Begin a big Process with a bit trying

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s