General :: Using DD Command With Bzip2?

Jul 3, 2010

I am looking to use DD to compress an entire disk (sda) to an image file on sdb. A friend told me to mount sdb / partition 1, then as root, type the following command:

Code:

dd if=/dev/sda | bzip2 -9 >/media/sdb1/disk_image.img.bz2

This did not work. I just get an error message:

Code:

Invalid command line: Not enough files given. Aborting...

I was also told to restore (assuming sda has the image & sdb is the destination), I could do the following:

Code:

bzip2 -cd /media/sda1/disk_image.img.bz2 | dd of=/dev/sdb

Of course, since the first part didnt work, I couldnt test the second. How to use DD to byte for byte image the entire drive & compress it (its mostly empty space).

View 8 Replies


ADVERTISEMENT

General :: Command Line - Unix - Program That Can Handle All Popular Compression/archiving Formats - E.g.tar, Gzip, Bzip2, Zip?

Jun 22, 2011

I sometimes get confused by the varying command line options I need to run common Unix archiving and compression software (e.g. gzip, bzip2, zip, tar).

Is there a program out there that can just Do What I Mean for common cases? For example:

View 2 Replies View Related

General :: Backup Script Multiple Gzips Into One Bzip2 Or Gzip?

Feb 18, 2010

I have a backup script basically is this

Code:

BACKUP_DIRS="/etc /boot /root /home"
BACKUP_FOLDER="/tmp/system_backup/
for DIR in ${BACKUP_DIRS}
do

[code]....

All the folders get dumped into seperate gzip files. Now I want all the gzip files in the backup folder into one final gzip or bzip2 file. My goal for this is to get one file instead of multiple so I can scp or ftp the one file to another file share. Which would be easier to send one file than a bunch of files.

View 2 Replies View Related

General :: Extracting A Bzip2 File Throws "Can't Guess Original Name" And Does Not Extract Separate Files

Dec 13, 2010

I made a bzip2 file by

bzip2 -c /home/os/picture1 > /home/os/Desktop/pic.image

bzip2 -c /home/os/picture2 >> /home/os/Desktop/pic.image

But now extracting pic.image by bzip2 -d /home/os/Desktop/pic.image returns

bzip2: Can't guess original name for pic.image -- using pic.image.out

And then it just creates one file pic.image.out.

How do I access picture1 and picture2 from pic.image?

View 2 Replies View Related

Ubuntu :: How To Install A Bzip2 File

Oct 31, 2010

how to install a bzip2 file

View 3 Replies View Related

Software :: Error 1 To Install Bzip2 1.0.5

Aug 25, 2009

I have a problem to install bzip2, when I put make install something like this appear:

This is the first time that I install something after I install Ubuntu 9.04.

View 2 Replies View Related

Ubuntu :: Bzip2 Compressed File Too Large

Feb 26, 2010

I have been having a recurring problem backing up my filesystem with tar, using bzip2 compression. Once the file reached a size of 4Gb, an error message appeared saying that the file was too large (I closed the terminal so do not have the exact message. Is there a way to retrieve it?). I was under the impression that bzip2 can support pretty much any size of file. It's rather strange: I have backed up files of about 4.5Gb before without trouble.

At the same time, I have had this problem before, and it's definitely not a memory problem: I am backing up onto a 100G external hard drive.

That reminds me, in fact, (I hadn't thought of this) that one time I tried to move an archived backup of about 4.5Gb to an external (it may have been the same one) and it said that the file was too large. Could it be that there is a maximum size of file I can transfer to the external in one go? Before I forget, I have ubuntu Karmic and my bzip2 version is 1.0.5 (and tar 1.22, though maybe this is superfluous information?)

View 4 Replies View Related

OpenSUSE :: New MB And Processor And Gzip/bzip2 Does Not Work Anymore

Jun 22, 2010

I am using suse for a long time but I did not yet experience this strange error:

I installed 11.2 and now 11.3RC1 on a new HW: ASUS M4N72-E with AMD Phenom2 X4 965, 8GB Memory, standard settings.

I experienced unusual errors when copying large files to the new system with scp/ssh (connection broken).

Even stranger I could not read .tgz files created on the older machine, same OS 11.2, but MB ASUS M2N32-SLI with AMD Phenom X4 9850

Testing further reveals that if I create a .gz file from the same source it produces every time a different output:

-rw-r--r-- 1 root root 3875041280 Jun 21 01:51 wwtest.tar
-rw-r--r-- 1 root root 1326141906 Jun 21 01:55 wwtest1.tar.gz
-rw-r--r-- 1 root root 1326137319 Jun 21 03:26 wwtest2.tar.gz
-rw-r--r-- 1 root root 1326146273 Jun 22 07:32 wwtest3.tar.gz

[Code].....

I never saw something like it, I guess it must be something with the underlying library not working on the new processor. I tried with slower memory speed, newest BIOS etc ...always the same errors. Other wise the system works absolutely stable.

When I compare the generated files with one created on the older system it looks like there are single bits missing in a random number of bites.

View 2 Replies View Related

Debian :: Cannot Install Kernel - Tar: Bzip2: Cannot Exec: No Such Directory

Sep 8, 2010

I have used this guide to install kernel in my linux cyberciti.biz/tips/compiling-linux-kernel-26.html stage 1 worked perfectly. Now at stage 2 when I write the command dir/ls in the tmp directory I see the file: linux-2.6.26.tar.bz2 (2.6.26 is the version of my kernel) And now if I try to the tar function on my file and write it like this: Code: tar -xjvf linux-2.6.26.tar.bz2 -C /usr/src it gives me couple of errors like:

tar: bzip2: can not exec: no such directory
tar: error is unrecoverable: exiting now
tar: child returned status 2
tar: error exit delayed from previus errors

View 2 Replies View Related

Software :: Shared Bzip2 Library - Correct GCC Dynamic Link Switches

May 29, 2009

I am trying to use a shared bzip2 library in a program I'm writing. For the life of me I can't figure out the correct gcc switch to link it in. I've tried pkg-config, but i don't know the name of the .pc file. Is there any rule for these things?

View 3 Replies View Related

Debian :: Error - Fetch Failed: W:Failed To Fetch Bzip2:/var/lib/apt/lists/partial

Feb 13, 2011

Lately when I've tried to update my packages many of them don't update. I get nothing out of the ordinary when using the terminal but when I try to update via the Update manger I get this error message:

Code:
Error message:
Fetch failed: W:Failed to fetch bzip2:/var/lib/apt/lists/partial/mirror.steadfast.net_debian_dists_testing_main_source_Sources Hash Sum mismatch
W:Failed to fetch bzip2:/var/lib/apt/lists/partial/mirror.steadfast.net_debian_dists_testing_main_binary-amd64_Packages Hash Sum mismatch, W:Failed to fetch http://mirror.steadfast.net/debian/dists/testing/updates/main/source/Sources 404 Not Found [IP: 208.100.4.53 80]

[Code]...

I've tried several different mirrors but get the same error with every one. Same result with ftp as well. Yesterday I upgraded to Wheezy and every package successfully upgraded, but today the problem started again.

View 10 Replies View Related

General :: Ubuntu 10.10 And Command Line Scripts - Error - Android: Command Not Found

Mar 26, 2011

I know my way around MS Windows much better, but I just don't feel right trying to program something for Android on a Microsoft operating system. I am interested in Android programming so I followed the instructions on [URL] to install the environment on my computer...

I just installed the JDK, SDK, Eclipse successfully (or I assume):

* When I get to Step 4 where I'm supposed to run 'android' it will not run. I get the error message "android: command not found" (I am definitely in the right directory).

** When I double-click it in nautilus, it opens up in gedit. I can set the permissions in nautilus (through the properties - Allow executing file as a program) and get it to work,

My system:

Intel i7
Ubuntu 10.10 Maverick Meerkat
android-sdk-linux-x86
eclipse 3.6.2

View 5 Replies View Related

General :: Append Command Output To File By Giving Command In Terminal?

Jul 3, 2009

I am using openSUSE 10.3.When I install software from tarball then to record time required I send output of date to beg.txt(when installation begins) and end.txt (when installation finishes).How can I append output of date to a file so I don't need two files?

View 4 Replies View Related

General :: Access The Dbxml From The Command Line And It Returns Command Not Found?

Apr 30, 2011

I installed the Berkeley DB on the Ubuntu server and tried to access the dbxml from the command line and it returns command not found

path/to/dir/dbxml-2.5.16/install/bin$dbxml
-bash" dbxml: command not found

Can someone point me in the right direction

View 1 Replies View Related

General :: Set Up New Keybinding For Finding Last Command Executed Using The First Few Characters Of The Command In Csh?

Jul 21, 2010

I want to be able to use Ctrl+R to have reverse-i search. Also if I press Shift+Up Arrow after typing the first few characters of a recently executed command then the shell should complete the command by finding the most recent commmand having the same first few characters.

View 1 Replies View Related

General :: Bash Command History Update Before Execution Of Command

Jun 7, 2010

Bash's command history is great, especially it is useful when adding the history -a command to the COMMAND_PROMPT.However, I'm wondering if there is a way to log the commands to a file as soon as the Return key is pressed, e.g. before starting the command and not on completion of the command (using the COMMAND_PROMPT option would save the command once the prompt is there again).

I read about auditing programs like snoopy and session recorder like script but I thought they're already too complex for the simple question I have. I guess that deactivating that script logs all the output of the command would lead already in the right direction but isn't there a quicker way to solve that probelm?

View 1 Replies View Related

General :: How Does Cp Command Determine Source And Destination Locations In Command?

Apr 14, 2011

When you run the following cp command in the BASH terminal, how does Linux know which files are the source and which are the destination when copying multiple files from one location to another?How does Linux know that the services, motd, fstab, and hosts files are the source and the /home/fred/my_dir is the destination?This question came up in a Linux class and I was not sure of the answer. I was thinking it is based on the source path entered ending with a file path and the destination being a directory, but was not sure.

View 4 Replies View Related

General :: Redirecting STDOUT Of Previous Command To STDIN Of Next Command

Nov 20, 2009

i'm trying to redirect the output of a command to the input of the next command. not sure if i'm going about this the right way. an easy method would be just to store the output of the previous command in a file and redirect input to read that file, but i'm curious to see if this can be done without writing to any files.

View 9 Replies View Related

General :: What Does This Cryptic Bash Command Mean - Why Command Crashes

Mar 20, 2011

Possible Duplicate: What does this cryptic bash command mean? Why this command crashes Linux? :(){ :|:& };:

View 4 Replies View Related

General :: Remote Command Execution Via SSH And Newgrp Command?

May 9, 2011

Up until now I've been using plink to remotely compile a project I'm working on. But recently the administrator from the remote server updated the distribution and messed up some configurations. My project has a lot of scripts written for tc shell (tcsh), and now the default shell is bash. There is no way to change this. Another problem is that now I need to run newgrp to change my default user group.

So... to work around this problem I've changed my .bashrc to run newgrp and then tcsh. If I do a normal connection using SSH, everything works as expected, but when using plink, or SSH to remotely execute commands, the shell gets stuck on the newgrp command. I think it's because both applications need a return value from newgrp to send the command I need to execute. Remotely running scripts that call a shell also get stuck like newgrp (newgrp also opens a new shell and that's why it gets stuck) my .bashrc is as follows:

Code:

user_grp=`id -g`
if [ $user_grp != 4919 ]; then
newgrp new_group_id
else

[code]....

View 4 Replies View Related

General :: Use This Command It Will Ask The User To Enter Year In Command?

Apr 4, 2011

i want in the website they ask to enter some input.Code:echo -e "<p>Please Enter Year : c</p> "read Yearif i use this command it will ask the user to enter year in command. but what i want is they ask the user to enter year in web browser.

View 14 Replies View Related

General :: Disable The Su Command On A Server So That Users Cant Run The Su Command?

Apr 29, 2010

i want to disable the su command on a server so that users cant run the su command i removed the comment from the 3 and 5 line in /etc/pam.d/su file but it doesnt seem to work the file is shown below

#%PAM-1.0
auth sufficient pam_rootok.so
# Uncomment the following line to implicitly trust users in the "wheel" group.

[code]....

View 8 Replies View Related

General :: Command To Delete Bash Command History?

May 31, 2010

What's the command to delete bash command history?

View 4 Replies View Related

General :: Only Execute 2nd Command On Successufl Execution Of 1st Command?

Aug 19, 2009

I have a script which builds a project and then runs junit tests. However, if the build fails, the junit tests fail with the same error message.Therefore the command which runs the junit tests should only be executed if the build was successful.

View 3 Replies View Related

General :: Redirecting Command Output To Input Of Another Command?

Jul 2, 2011

I want to run gsettings list-schemas (which return a list of about 100 names separated by spaces)and somehow direct each name one at a time as the input to this command:gsettings list-recursivelyI've tried it with awk, and standard | piping and also as a string variable strvar=$(gsettings list-schemas) and using the $strvar as the input butam missing something in between I'm sure like for - while or proper syntax of awk etc

View 3 Replies View Related

General :: Use Output Of Previous Command As Parameter To Another Command?

Nov 13, 2010

I want to use the output of a previous command as a parameter to another command. For example: to know where "nice" is stored i typed: which nice output: /usr/bin/nice now the second command i typed is: ls -l /usr/bin/nice Is there a way to have a single command like: ls -l which nice ?

View 4 Replies View Related

General :: Use 'history' Command To Fire Last Run Command?

Oct 14, 2010

How do I use the "history" command to fire the last run command?

View 3 Replies View Related

General :: Write <Esc> In The Vim Command Line (:vim Command)?

Jun 24, 2011

how do you write the ASCII character #27 in the vim command line?

View 6 Replies View Related

General :: Merging Two Command In One Command?

Feb 18, 2010

I have a file and it has some content . Now I want to check for some text in that file and if does not exist I want to append it . So I need to first grep and then do "echo "content" >> s.txt" . Is there any way to execute this two commands in a single command .

View 3 Replies View Related

General :: Unable To Neither Add New Users Using Command Useradd Nor Delete Existing Users Using Command Userdel

Jun 30, 2010

Im not getting able to neither add new users using command useradd nor delete existing users using command userdel. And even Im not getting able to login into any existing users except root. It was ok before. Im having this problem very recently on my linux server. Im using RHEL5.

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved