🔒 Closed how to archive all files in a specific folder(ex. Documents) using script

Status
Not open for further replies.
Guys pa help po paano po ba i archive lahat ng files or content sa isang folder like documents folder gamit po ang script.

Thanks po
 
Check the filesize of the directory first:
user@debian10:~$ du -sh programming/bash/
1.2M programming/bash/

--------------------------------------------------------------

Then archive and compress it (bzip2):
tar cvpjf myarchive.tar.bz2 programming/bash/

--------------------------------------------------------------

Finally, check the filesize of your archive:
user@debian10:~$ ls -lh myarchive.tar.bz2
-rw-r--r-- 1 user user 460K Jan 27 07:58 myarchive.tar.bz2
 
Check the filesize of the directory first:
user@debian10:~$ du -sh programming/bash/
1.2M programming/bash/

--------------------------------------------------------------

Then archive and compress it (bzip2):
tar cvpjf myarchive.tar.bz2 programming/bash/

--------------------------------------------------------------

Finally, check the filesize of your archive:
user@debian10:~$ ls -lh myarchive.tar.bz2
-rw-r--r-- 1 user user 460K Jan 27 07:58 myarchive.tar.bz2
Ok na po hehehe.
Thanks po
 
Status
Not open for further replies.

About this Thread

  • 2
    Replies
  • 493
    Views
  • 2
    Participants
Last reply from:
Dark-King

Online now

Members online
1,507
Guests online
2,162
Total visitors
3,669

Forum statistics

Threads
2,299,817
Posts
29,132,883
Members
1,201,140
Latest member
Yanii
Back
Top