Zip all files in a directory?

walker.king89

Member
Registered
Joined
Jun 19, 2014
Messages
26
Points
3
I am learning Linux and purchased a small vps 1GB of RAM to install hosting software on it. I uploaded many files and folders to my host, I heard that ssh can allow me to zip all files in a directory? how can i do that and how to download my zipped file to my pc?

Your help would be appreciated!
 

cyberpersons

Member
Registered
Joined
Jun 17, 2017
Messages
45
Points
0
For example you want to zip all files in a folder named : cyberpersons


You can use this command,

zip -r cyberpersons.zip cyberpersons

Now your zip file will be present in the current directory, please note that your current directory should not be "cyberpersons" while creating a zip file.

After the zip file is created, you can use WinSCP or FileZilla to connect to your vps and download it to your computer.
 

walker.king89

Member
Registered
Joined
Jun 19, 2014
Messages
26
Points
3
zip -r cyberpersons.zip cyberpersons
I ran this command on public_html folder and saw zip file there.

After the zip file is created, you can use WinSCP or FileZilla to connect to your vps and download it to your computer.
and downloaded zip file to my computer but when I opened it, I don't see .htaccess file in the zip package, seem it ignored hidden files or .htaccess fle. How to be sure I will zip all files in a folder without missing any files or folder.
 

vpsrus

Well-known member
Hosting Provider
Registered
Joined
Jan 17, 2017
Messages
92
Points
0
zip yourfilename.zip directory/* .*

this will zip the hidden files too
 
Older Threads
Newer Threads
Replies
1
Views
5,167
Replies
25
Views
10,437
Recommended Threads
Replies
7
Views
3,030
Replies
48
Views
8,589
Replies
7
Views
34,418

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top