Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [root@SERVER02 success]# ll
- total 48
- drwxr-xr-x 2 root root 4096 Feb 8 03:07 20130101
- drwxr-xr-x 2 root root 4096 Feb 8 03:07 20130102
- drwxr-xr-x 2 root root 4096 Feb 8 03:08 20130103
- drwxr-xr-x 2 root root 4096 Feb 8 03:09 20130104
- drwxr-xr-x 2 root root 4096 Feb 8 03:09 20130105
- drwxr-xr-x 2 root root 4096 Feb 8 03:10 20130106
- drwxr-xr-x 2 root root 4096 Feb 8 03:11 20130107
- drwxr-xr-x 2 root root 4096 Feb 8 03:11 20130108
- drwxr-xr-x 2 root root 4096 Feb 8 03:12 20130109
- drwxr-xr-x 2 root root 4096 Jan 11 00:00 20130110
- drwxr-xr-x 2 root root 4096 Jan 12 00:00 20130111
- drwxr-xr-x 2 root root 4096 Jan 13 00:00 20130112
- drwxr-xr-x 2 root root 4096 Jan 14 00:00 20130113
- drwxr-xr-x 2 root root 4096 Jan 15 00:00 20130114
- drwxr-xr-x 2 root root 4096 Jan 16 00:00 20130115
- drwxr-xr-x 2 root root 4096 Jan 17 00:00 20130116
- drwxr-xr-x 2 root root 4096 Jan 18 00:00 20130117
- drwxr-xr-x 2 root root 4096 Jan 19 00:00 20130118
- drwxr-xr-x 2 root root 4096 Jan 20 00:00 20130119
- drwxr-xr-x 2 root root 4096 Jan 21 00:00 20130120
- drwxr-xr-x 2 root root 4096 Jan 22 00:00 20130121
- drwxr-xr-x 2 root root 4096 Jan 23 00:00 20130122
- drwxr-xr-x 2 root root 4096 Jan 24 00:00 20130123
- drwxr-xr-x 2 root root 4096 Jan 25 00:00 20130124
- drwxr-xr-x 2 root root 4096 Jan 26 00:00 20130125
- drwxr-xr-x 2 root root 4096 Jan 27 00:00 20130126
- drwxr-xr-x 2 root root 4096 Jan 28 00:00 20130127
- drwxr-xr-x 2 root root 4096 Jan 29 00:00 20130128
- drwxr-xr-x 2 root root 4096 Jan 30 00:00 20130129
- drwxr-xr-x 2 root root 4096 Jan 31 00:00 20130130
- drwxr-xr-x 2 root root 4096 Feb 1 00:00 20130131
- drwxr-xr-x 2 root root 4096 Feb 2 00:00 20130201
- drwxr-xr-x 2 root root 4096 Feb 3 00:00 20130202
- drwxr-xr-x 2 root root 4096 Feb 4 00:00 20130203
- drwxr-xr-x 2 root root 4096 Feb 5 00:00 20130204
- drwxr-xr-x 2 root root 4096 Feb 6 00:00 20130205
- drwxr-xr-x 2 root root 4096 Feb 7 00:00 20130206
- drwxr-xr-x 2 root root 4096 Feb 8 00:00 20130207
- drwxr-xr-x 2 root root 4096 Feb 9 00:00 20130208
- drwxr-xr-x 2 root root 4096 Feb 10 00:00 20130209
- drwxr-xr-x 2 root root 4096 Feb 11 00:00 20130210
- drwxr-xr-x 2 root root 4096 Feb 12 00:00 20130211
- drwxr-xr-x 2 root root 4096 Feb 13 00:00 20130212
- drwxr-xr-x 2 root root 4096 Feb 14 00:00 20130213
- drwxr-xr-x 2 root root 4096 Feb 15 00:00 20130214
- drwxr-xr-x 2 root root 4096 Feb 16 00:00 20130215
- drwxr-xr-x 2 root root 4096 Feb 16 23:30 20130216
- -rw------- 1 root root 11732 Aug 28 16:50 nohup.out
- ================
- didalam folder tanggal itu, ada file yg pengen dicompress
- ================
- perintah biasa akan seperti ini:
- [root@SERVER02 success]# nohup bzip2 20130110/* &
- [1] 31333
- [root@SERVER02 success]# nohup: appending output to `nohup.out'
- [1]+ Done nohup bzip2 20130110/*
- nohup: menjalankan command, jika tty ditutup command akan terus dijalankan
- bzip2 20130110/* : compress semua isi file didalam folder 20130110
- & : jalankan di background
- ============================
- NOW, THIS IS MY PROB:
- nah kalo satu2 kan lama, saya juga gak pengen bikin script (udah kebanyakan script di server)
- jadi saya pengen eksekusi semua folder dengan satu command line menggunakan looping. (malah dapat error)
- [root@SERVER02 success]# for tgl in {10..31}; do nohup bzip2 201301$tgl/* done; &
- -bash: syntax error near unexpected token `&'
- =====================================
- anybody can help??? :P
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement