Linux Create Users : How To Create Users In Linux
grep Command in Linux : What is grep Command ?
Linux netstat Command : Linux Networking
Linux chown Command In Hindi : chown Command Examples
AWS Create VPC Manually | Create VPC In AWS In Hindi
PHP Form validation | Validate User Input Data In PHP In Hindi
Best Keyboards Under 1000 Available On Amazon
JavaScript Interview Question For Beginners In Hindi
PHP Null Coalescing Operator In Hindi , Null Coalescing Operator kya hai ?
If tutorials available on this website are helpful for you, please whitelist this website in your ad blocker😭 or Donate to help us ❤️ pay for the web hosting to keep the website running.
ZIP एक archive file format है जो lossless data compression
support करता है। lossless data compression का मतलब है बिना कोई data को loss किये perfectly कम size में compress करना। ZIP file format कई compression algorithms allow / use करती है , जिनमे DEFLATE
सबसे common है।
Linux में unzip
command का use किसी zip file को extract करने के लिए किया जाता है। अगर आपके system पर unzip installed नहीं है , तो नीचे दी गयी command को run करके पहले unzip install कर लें।
$ sudo apt update $ sudo apt install unzip
बैसे तो unzip command में कई options हैं जिन्हे आप unzip --help
command run करके देख सकते हैं।
$ unzip --help
Example के लिए हमने पिछले topic (Linux zip Command) में एक index.zip
file create की थी , उसी zip files को different - different तरीके से वापस unzip
करने की कोशिश करेंगे।
$ unzip zip_filename
जब आप किसी zip file को unzip करेंगे तो जिस structure में zip file में content होगा उसी structure में extract हो जायगा।
$ unzip index.zip Archive: index.zip inflating: python.html creating: dir1/ inflating: dir1/blogs
Output में आप देख सकते हैं कि index.zip file से कौन कौन सी files unzip हुई है। बाकी listing के लिए आप ls Command या tree Command का use कर सकते हैं।
$ tree . ├── dir1 │ └── blogs ├── index.zip └── python.html 1 directory, 3 files
zip file content को किसी new folder में extract करने के लिए -d
option का use कर सकते हैं। pass की गयी directory अगर नहीं बनी तो new directory create हो जाएगी और अगर बनी हुई है तो उसमे content extract हो जायगा।
$ unzip -d zip_dir index.zip Archive: index.zip inflating: zip_dir/python.html creating: zip_dir/dir1/ inflating: zip_dir/dir1/blogs
बैसे तो इसकी need कम ही पड़ती है लेकिन फिर भी आप extract किये गए content को फिर से overwrite करना चाहते हैं तो , आपको -o option का use करना पड़ेगा।
$ unzip -o index.zip
extract करते समय आप ये भी define कर सकते हैं कि zip file से कौन सी files extract हो। unzip करते समय files को exclude करने के लिए -x
option का use किया जाता है।
$ unzip -x index.zip python.html
यह option बहुत important है , जिसे आप different तरीके से use कर सकते हैं।
For example
unzip -x zip_filename file1 file2 // exclude multiple files unzip -x zip_filename *.html // exclude only html files, you can use other extensions also. unzip -x zip_filename *txt // exclude files that ends with txt name . and so on
Loading ...
Hi ! I'm Rahul Kumar Rajput founder of learnhindituts.com. I'm a software developer having more than 4 years of experience. I love to talk about programming as well as writing technical tutorials and blogs that can help to others. I'm here to help you navigate the coding cosmos and turn your ideas into reality, keep coding, keep learning :)
Get connected with me. :) LinkedIn Twitter Instagram Facebook