Archives

Entries with the tag 'Extract Files'

Search and shrinking files and folders in Linux

2 תגובות August 23, 2009 2 comments

In this tutorial we will learn in a nutshell how you can extract and compress files and folders using commands in the consul.
Shrinking files -

First, choose the format for compressing (shrinking) files:

  • GZip
  • Zip
  • tar
  • tar.gz

To shrink the file / folder do the following commands for each format:

Gzip -

gzip -c example.txt  > example.gz

Zip -

zip -c example.zip  example.txt

tar -

tar -cvf example.tar example.txt

tar.gz -

tar -zcvf example.tar.gz example.txt

ועכשיו, בכדי לחלץ את הקובץ בצעו את הפקודות הבאות עבור כל פורמט:

Gzip -

gunzip example.gz

Zip -

unzip example.zip

tar -

tar -xvf example.tar

tar.gz -

tar -zxvf example.tar.gz

אלו הפקודות הבסיסיות לכיווץ וחילוץ דרך SSH בלינוקס.
ישנן עוד הרבה מאוד אפשרויות לפקודות שלא הסברנו במדריך, וניתן למצוא את רובן כאן.

בהצלחה!

קטגוריות: תחזוק שרתי Linux תגיות: , , , , , , ,