🔒 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
  • 507
    Views
  • 2
    Participants
Last reply from:
Dark-King

Trending Topics

Online now

Members online
653
Guests online
7,065
Total visitors
7,718

Forum statistics

Threads
2,339,185
Posts
29,308,228
Members
1,122,914
Latest member
LadyNichole_Mae
Back
Top