LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-01-2023, 01:15 PM   #1
openbsd98324
Member
 
Registered: Feb 2022
Posts: 72

Rep: Reputation: 5
How to extract a 7z file to device /dev/sda with pipe ?


Hello,

How to use 7zr x to pipe to dev? i.e. How to extract a 7z file to device /dev/sda with pipe ?

Example:

Code:
7zr x myfile-operating-system-sda.img.7z -so > /dev/sda ??

thank you and kind regards
 
Old 11-01-2023, 06:05 PM   #2
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,152
Blog Entries: 6

Rep: Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835
From man 7zr:
Code:
Backup and limitations
       DO NOT USE the 7-zip format for backup purpose on Linux/Unix because :
        - 7-zip does not store the owner/group of the file.
See:
Code:
man 7zr
I would say that you should extract that image file. Then use dd to write it to device node.
Code:
dd if=myfile-operating-system-sda.img of=/dev/sda bs=1M
Everything on sda will be overwritten.
 
1 members found this post helpful.
Old 11-01-2023, 08:16 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,152

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
That implies everything on the backup already taken will be useless. Take another backup with something that understands *nix - maybe clonezilla for the entire device.
 
Old 11-02-2023, 12:22 AM   #4
lvm_
Member
 
Registered: Jul 2020
Posts: 983

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
You should put switches before file names - "7z x -so filename > file", and all will be fine. Disregard previous messages, they do not apply in your case - people are being inattentive.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
iscsi: which local device (/dev/sda, /dev/sdb) is used WITHOUT dmesg? knikkerr Linux - Software 3 08-13-2010 04:30 AM
Installing RIP LinuX on a USB drive - device name /dev/sdc becomes /dev/sda Mleahy Linux - Software 1 07-30-2008 08:57 PM
how the device will take the name as /dev/sda.../dev/sdb... ? sanjay2004 Linux - Software 1 05-27-2008 09:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration