Skip to main content
Skrip extract tarball ke dalam direktori masing-masing

for i in `ls *.tar`
do
dirname=`echo $i | awk -F. '{print $1}'`
mkdir -p $dirname
tar -xpvf $i -C ${i%.tar}
done

changelog:
1-concurrent kod istas dgn bro root
2-tambah option -p pada tar command,otherwise jenuh chown
3-letak option to directory -C di depan $i (rujuk man tar untuk opsyen
-C )

sebagai alternatif;

for i in `ls *.tar`

boleh diringkaskan dengan

for i in *.tar

sahaja,sebab sama.

Comments

Popular posts from this blog

Gue dengan S2 gue. Sronok banget!

Vultr - another reliable alternative for SEA Virtual Private Server!

I have been using Vultr  as my recent VPS now, since it has just a nearby Data Center in Singapore (sadly, Malaysian VPS is always expensive.. so the best option is DC in Singapore - most of the time). It provides free trial credit for around USD5.. and +USD2 if you did a social media integration/sharing with Twitter. Try it now. Click Vultr