Questions tagged [cpio]

A tool for creating and extracting archives as well as passing files to another directory tree.

Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

add files to cpio [duplicate]

is there any way to add files to an existing cpio-file? i want to avoid unpacking,adding,repacking order, because my cpio is a buildroot rootfs where i want to add kernel-modules. if i unpack to ...
0
votes
1answer
67 views

How to extract a compressed tar using cpio to a particular directory location

I created the compressed tar file using the below command. find /app/jboss -not -name "*.err" -not -name "*.log" | cpio -o | gzip >/app/patchbkp/test/REDHAT_jboss-eap-7.2_18-Aug-...
1
vote
0answers
17 views

creating a cpio archive ingnoring modification time of files [duplicate]

how can I create a cpio archive by ignoring the modification times of the files (or imposing them at a known value)? The context is as follows: in the build process of an embedded project some "...
0
votes
1answer
127 views

Problem extracting the “initrd” archive in kernel 5.4

I can see my initrd is occupied almost 90 MB of disk but after extracting it via cpio , it contains only a 30 KB microcode : $ cpio -it < initrd.img-5.4.0-18-generic . kernel kernel/x86 kernel/...
0
votes
2answers
196 views

Is there a practical way to make binary-reproducible CPIO (initramfs) archives?

I would like my initramfs to have the same hash no matter when or where I build it if the contents of the files are the same (and are owned by root and have same permissions). I don't see any options ...
0
votes
1answer
275 views

Is there a backup utility to backup to LTO tape that's not TAR, PAX, or CPIO?

I'm using Solaris 11.3 and wish to occasionally backup a bunch of large VM's and disk images directly to a used LTO6 tape drive bought off Ebay but even though Solaris TAR has the "E" flag to allow ...
-3
votes
1answer
270 views

Extracting all cpio files in a directory

I'm using ssh to connect to a server which has a directory full of cpio files. I need to extract all the files in the directory, so I tried to write in the terminal: cpio -ivd But when I press enter ...
0
votes
1answer
450 views

cpio fails to extract files

In the following sequence of commands, why does cpio fails to extract the files previously archived? /home/pkara/Desktop/temp $ ls eBooks myfile.tar /home/pkara/Desktop/temp $ find . -depth -print | ...
0
votes
1answer
273 views

Create absolute path in cpio archive

I build some archive for linux kernel it need an archive file with absolute path. File are under folder /data/ when I pack normally it keeps file path like this bin/ln bin/ls etc the command I used ...
-1
votes
2answers
279 views

Archived rootfs: convert tar to cpio for initramfs

I have a Debian rootfs as a tar file. I would like to specify it as the initramfs source in Kconfig (using PetaLinux), but the source must be a cpio archive. How can I convert the .tar to .cpio, ...
4
votes
1answer
3k views

How to extract a single file from a cpio archive?

I have a cpio archive with lots of files and I need to extract only one file, not all. With tar I could just use tar -xf archive.tar path/to/file, but that does not work with cpio: cpio -i < ...
1
vote
1answer
292 views

How to use 'find' and 'cpio' to exclude parent directories

I want to copy over all html files in a nested directory but I want to prevent the parent folders above it from being generated as well. That is if my source path is /project/ng1/src/templates/**, ...
0
votes
1answer
182 views

How to Copy Millions of Files from Remote Server to Local One [duplicate]

I have this problem, I have an Ubuntu server (SSH enabled on port 4444). Inside this server there's a directory called /folder/a/, this directory literally contains millions of small size text files. ...
0
votes
0answers
145 views

Using cpio command to compress directory and move it

I want to make /lib/modules compress copy and move to /opt directory. using cpio I try this cpio /lib/modules > directory.cpio | mv directory.cpio /opt
1
vote
2answers
1k views

How to recursively copy a directory using cpio?

How do I copy recursively a directory within the list at my-files-to-copy.txt? cd my/source/dir cpio --create < my-files-to-copy.txt | (cd my/dest/dir && cpio --extract) my-files-to-copy....
0
votes
1answer
558 views

Backing up Linux to a Windows file system for later restoration

I need to backup / copy the files of my Linux installation to an external drive, so that I can restore them onto the new, larger disk. The destination disk for the restoration is twice as large, and ...
1
vote
2answers
113 views

Is there an archive file format supporting file-level concatenation?

It is a rather theoretical question but is there some (not too obscure) incremental archive format allowing to append to an existing archive using >> or to join several archives using a simple ...
-1
votes
1answer
89 views

How copy files from file-name list and unconditional keep existing file in destination?

How copy files from file-name list and unconditional keep existing file in destination? Note cpio is overwrite older existing files by default: $ dpkg -L libgcc1 libstdc++6 |grep -e '^/lib/' -e '^/...
3
votes
2answers
657 views

Why do we use `find -depth` with `cpio`

From the info cpio page: If you wanted to archive an entire directory tree, the find command can provide the file list to cpio: % find . -print -depth | cpio -ov > tree.cpio The '-...
3
votes
3answers
696 views

Transform tar into cpio without rooting?

I have a tarball containing many files with root:root owner and/or special device inodes. cpio only accepts paths existing in the file system when it is creating a cpio archive. And I don't want to ...
6
votes
1answer
6k views

update-initramfs hangs on debian Stretch

using apt-get upgrade on Debian left me with the decision to update to kernel 4.9.0-6 but the installation never finishes. It always stalls at the following stage: Setting up linux-image-4.9.0-6-...
0
votes
1answer
75 views

Use a directory from RPM as a parameter for different tool

I have a need to fetch a folder from an RPM package that contains number of .jar files. My idea was that maybe it would be possible to pass it in a stream to java -cp command as classpath for it? The ...
3
votes
1answer
680 views

Relocating files while extracting RPM

I'm trying to extract files from relocatable RPMs and am facing the current problem: rpm2cpio my.rpm | cpio -ivd works very well but I get the full path of the files, including the default prefix ...
5
votes
1answer
6k views

How to create ASCII cpio archive (SVR4 with no CRC)?

I have a file in /boot/initramfs.gz extract it using tar -xzvf initramfs.gz -C ./ I got a file initramfs. └──╼ $ file initramfs initramfs: ASCII cpio archive (SVR4 with no CRC) It can be open using ...
1
vote
2answers
2k views

how to compress a folder without to leave the original folder and without to remove the original folder

under SQL directory we have only the tmp folder (tmp folder usage 59G) is it possible to compress the folder tmp without to leave the original tmp folder ? , so the compression will work on the ...
3
votes
2answers
1k views

Extract files with cpio where one or more paths may contain spaces

We have a cpio archive that was created by generating a file that contains a list of absolute paths to be included in the archive. (one absolute path per line of a plain text file) The command to ...
4
votes
3answers
3k views

Extracting concatenated cpio archives

initramfs archives on Linux can consist of a series of concatenated, gzipped cpio files. Given such an archive, how can one extract all the embedded archives, as opposed to only the first one? The ...
1
vote
2answers
451 views

How to engage with Fedora 23 error message in dnf install error of dnspython?

I am not sure whether this constitutes a bug - so, I dare to try it here... When attempting to install (with dnf) versions of the package python-dns, I get the following error: unpacking of ...
0
votes
1answer
32 views

Not able to see the backed up file in the backed up media

I used 2 commands cpio and tar to perform the same operation of backing up data to an external drive which is my 8Gb pen drive (sandisk brand). At the time of executing the commands, it outputs ...
8
votes
1answer
6k views

Appending files to initramfs image - reliable?

I'm modifying a bunch of initramfs archives from different Linux distros in which normally only one file is being changed. I would like to automate the process without switching to root user to ...
3
votes
0answers
45 views

chroot and hyperos on ArchLinux?

hyperos is a fork of tinycorelinux Can I run hyperos in a chroot? How can I create an ISO image from files on repo? Is this possible? Which steps should I follow?
2
votes
2answers
504 views

Copy file and file structure and merge in new directory

I used the following command line find src -name '*.json' | cpio -pdm lib So it found the json file as in the sceenshot below But then it takes the whole directory structure and places it into the ...
3
votes
3answers
1k views

Archiving to remote-machine with tar/cpio and ssh?

I'm renting a couple of VPS with Ubuntu, and I've managed to fill-up one of them. Here I've got several directories with lots of files I'd like to put into an archive. Unfortunately, I don't have ...
2
votes
1answer
481 views

Change CPIO format to newc without extraction

I am trying to create modify an u-boot filesystem image. At first I tried to extract, modify and then pack it again, but that didn't work, because extracting and repacking seems to mess up the ...
2
votes
2answers
1k views

Create cpio file with different absolute directory

I am trying to modify a file system image packed with cpio. For that reason I first need to extract and later pack the image. As the image contains a whole file system all the files are given in ...
1
vote
1answer
257 views

Extract tree from cpio archive

I have an RPM contaning files in ./var/lib which I need to extract onto my filesystem on a Debian machine. I'm trying to do this: rpm2cpio myrpm.rpm | cpio -ivd ./var/lib Nothis is extracted. If I ...
0
votes
3answers
223 views

what the best approach in order to compress directory with Hundreds of sub directories [closed]

Under /usr/cti/APP_sys, I have hundreds of directories and subdirectories and files, etc. I wonder what the best approach in order to compress the /usr/cti/APP_sys directory (get the best low ...
3
votes
1answer
4k views

cpio VS tar - what the best archive solution in order to compress hundred of directories to one file

I have hundreds of directories under /var/Recording, and each directory there will have subdirectories, including files, hard links and soft links. I want to compress all directories under /var/...
38
votes
6answers
14k views

Why is it that my initrd only has one directory, namely, 'kernel'?

I'm using debian live-build to work on a bootable system. By the end of the process i get the typical files used to boot a live system: a squashfs file, some GRUB modules and config files, and an ...
2
votes
1answer
1k views

Need to understand cpio -d and --make-directories

I am studying for the LPIC exam and the command cpio with options -d and --make-directories came up. Would someone be able to provide an example on how these work. cpio -d cpio --make-directories
13
votes
2answers
4k views

How to convince tar (etc.) to archive block device contents?

I have six Linux logical volumes that together back a virtual machine. The VM is currently shutdown, so its easy to take consistent images of them. I'd like to pack all six images together in an ...
5
votes
4answers
11k views

Unpack, modify and pack initrd as a user

I've got a problem with rebuilding the initrd image as a user. Firstly, when I try to "unpack" the original initrd image: cpio -idm < initrd-base cpio: dev/tty8: Cannot mknod: Operation not ...
4
votes
2answers
2k views

what are the techniques to extract files safely?

Yesterday I was making some experiments on Slitaz. It uses multiple initrd.img's to store files/changes. I wanted to extract one of its initrd.gz images (which is a cpio archive) to a folder, edit/...
2
votes
1answer
66 views

What is the meaning of '.' in the cpio file

This is my the content of my rootfs.cpio file: [root@xilinx output]# cpio -idv < rootfs.cpio . init dev dev/console 1149 blocks What is . here ?
2
votes
1answer
708 views

When I execute a cpio command, it hangs forever

I've been trying to unarchive a cpio archive (in this case, my initial ramdisk). However, when I try to extract the files, cpio hangs forever. It happens if I pass the -V argument to print extra info, ...
0
votes
2answers
2k views

Using rsync or cpio to do an incremental backup [duplicate]

I'm trying to do an incremental backup of all files on my NAS box that where modified in the last 24 hours (or so, can be more flexible). I'm using PuTTY to connect through SSH to a ReadyNAS 102 ...
1
vote
1answer
2k views

Is the busybox cpio THAT different from GNU cpio?

I'm trying to do an incremental backup using cpio but it seems that the busybox version doesn't work the same as the normal one? This is what I've got so far: find data/Backup -mtime -2 | cpio -cm ...
7
votes
6answers
3k views

How would you use the cpio command?

While studying for the lpic exam, I've run into the command cpio. The description of cpio states: Cpio was originally designed to store backup file archives on a tape device in a sequential, ...
1
vote
3answers
1k views

How to include directory tree for back-up using cpio?

I am backing up files including directories from 1 partition to other using cpio. cpio works perfect for backing but I am unable to backup directory tree. I am in a partition mounted on the directory ...
0
votes
1answer
173 views

back-up command `cpio` isnt working?

I'm unable to back up files using cpio. root@ravbholua-Aspire-5315:/home/ravbholua/CCPP/HelloWorld/das/das1/book/backup# ls arg_check.h compute.h quit.h root@ravbholua-Aspire-5315:/home/ravbholua/...