Last update at :2024-01-02,Edit by888u
Building websites in a VPS often requires moving. What I often do is to package the website directory and compress it into zip format (many virtual hosts support zip format), then download and upload it to a new website space, and then decompress it. Therefore, it is necessary to understand the compression and decompression of zip format.
zip usage and common parameters: -a Convert the file to ASCII mode -F attempts to repair corrupted archives -h displays help interface -m After compressing the file, delete the source file -n specific string Do not compress files with specific suffix strings -o Set the latest change time of all files in the compressed file to the time of compression -q Quiet mode, does not display the execution process of instructions during compression -r processes all subdirectories and files in the specified directory together -S includes system files and hidden files (S is uppercase) -t date sets the last modification date of the compressed file to the specified date, and the date format is mmddyyyy
zip compression and decompression installation
1 apt-get install zip unzip zip compression command If the above indicates that it has no function, install it first. If it already exists, there is no need to install it
I want to compress a file abc.txt and a directory dir1 into yasuo.zip:
1 zip -r yasuo.zip abc.txt dir1 zip decompression command
I downloaded a yasuo.zip file and want to unzip it:
1 unzipyasuo.zip I have a large compressed file large.zip, I don't want to unzip it, I just want to see what's in it:
1 unzip -v large.zip Unzip to the specified directory
1 unzip yasuo.zip -d /yasuo
Recommended site searches: free foreign space, Taiwan host, Taiwan server rental, address check by IP, Hong Kong host hosting, cloud server recommendation, host space, same IP website query, Hong Kong vps host, how to buy virtual host,
p>
发表评论