ubuntu@ubuntu:11$ cat 1.sh
#!/bin/bash
mkdir /home/ubuntu/dir
mkdir /home/ubuntu/dir/dir1
mkdir /home/ubuntu/dir/dir2
cp * /home/ubuntu/dir/dir1 -r
cp *.sh /home/ubuntu/dir2 -r
tar -cJf /home/ubuntu/dir/dir2/dir2.tar.xz /home/ubuntu/dir/dir2
mv /home/ubuntu/dir/dir2/dir2.tar.xz /home/ubuntu/dir/dir1
tar -xJf /home/ubuntu/dir/dir1/dir2.tar.xz -C /home/ubuntu/dir/dir1/
tree /home/ubuntu/dir/