[LINUX] Zip-compress any file with the [shell] command to create a file and delete the original file.

I will leave it as a memo.

manner

zip -m -j "Full path of compressed file" "Full path of the file to be compressed"
# -m Optional: Delete the original file to be compressed.
# -j Option: Compress the target file alone. (If this option is not available, it will be compressed with the file structure included.)

that's all.

Recommended Posts

Zip-compress any file with the [shell] command to create a file and delete the original file.
How to make a command to read the configuration file with pyramid
I tried to create Bulls and Cows with a shell program
Replace the directory name and the file name in the directory together with a Linux command.
Save the object to a file with pickle
Create a command to get the work log
Upload data to s3 of aws with a command and update it, and delete the used data (on the way)
How to delete the specified string with the sed command! !! !!
How to create a submenu with the [Blender] plugin
Create a command to search for similar compounds from the target database with RDKit and check the processing time
Probably the easiest way to create a pdf with Python3
Create an audio file with the text-to-speech function with Google Text To Speak and check the text as a guide for the speech for 3 minutes.
How to create a config file
Create a file uploader with Django
Create a temporary file with django as a zip file and return it
Conditional branch due to the existence of a shell script file
[Go] Create a CLI command to change the extension of the image
How to output the output result of the Linux man command to a file
Dig the directory and create a list of directory paths + file names
Create a REST API to operate dynamodb with the Django REST Framework
Create and return a CP932 CSV file for Excel with Chalice
[Python] Create a program to delete line breaks in the clipboard + Register as a shortcut with windows
Create a large text file with shellscript
Create a command to delete all temporary files generated in a specific folder
Create a VM with a YAML file (KVM)
[Python] How to create a dictionary type list, add / change / delete elements, and extract with a for statement
Read the file with python and delete the line breaks [Notes on reading the file]
Script to create a Mac dictionary file
Try rewriting the file with the less command
I tried to control the network bandwidth and delay with the tc command
A command to specify a file with a specific name in a directory with find and mv, cp, or gzip it (linux)
Function to extract the maximum and minimum values ​​in a slice with Go
Create a Python image in Django without a dummy image file and test the image upload
Attempt to launch another .exe and save the console output to a text file
Create a simple reception system with the Python serverless framework Chalice and Twilio
I want to make a music player and file music at the same time
I want to write an element to a file with numpy and check it.
Create a stacked graph corresponding to both positive and negative directions with matplotlib
[Python] How to create a local web server environment with SimpleHTTPServer and CGIHTTPServer
I tried to create a model with the sample of Amazon SageMaker Autopilot
Create a clean DB for testing with FastAPI and unittest the API with pytest
How to read a CSV file with Python 2/3
Create a GUI executable file created with tkinter
How to create a JSON file in Python
Create a PDF file with a random page size
Adjust file permissions with the Linux command chmod
Create a command to encode / decode Splunk base64
Use click to create a sub-sub command --netsted sub-sub command -
Steps to create a Twitter bot with python
Compile and run Rust with a single command
Try to create a new command on linux
How to create a shortcut command for LINUX
How to create a multi-platform app with kivy
Create a Photoshop format file (.psd) with python
I want to write to a file with Python
Create a cylinder with open3d + STL file output
Create a translation tool with the Translate Toolkit
How to use the grep command to recursively search directories and files to a specified depth
Try to create a battle record table with matplotlib from the data of "Schedule-kun"
[Django] Test to send a file by POST and check the returned context [TDD]
sphinx-quickstart got messy and I tried to create an alternative command and the stress disappeared