LinuxQuestions.org
Visit Jeremy's Blog.
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 02-10-2006, 11:50 AM   #1
thronh
LQ Newbie
 
Registered: Jan 2006
Posts: 9

Rep: Reputation: 0
Running CPIO from scripts


Hello,
When I run CPIO from a script I get an error saying "cpio: write error: No space left on device" but when I run the cpio command from the command line it works. Any ideas what Im doing wrong? Below is the scrip I created and then the command line I ran. I am running both as root. BTW Im using Redhat Enterprise 4

The script:

mt -f /dev/st0 retension
find /data/. >>backuplist
cpio -ov <backuplist >/dev/sd0

The command

cpio -ov <./backuplist >/dev/sd0

Any ideas as to why the script fails but the command line doesn't?

Thanks
Thron
 
Old 02-12-2006, 09:37 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,986
Blog Entries: 14

Rep: Reputation: 1187Reputation: 1187Reputation: 1187Reputation: 1187Reputation: 1187Reputation: 1187Reputation: 1187Reputation: 1187Reputation: 1187
You retension st0 then go to sd0 - tape vs disk. If you're sending to sd0 why are you retensioning st0? Is this a typo in your post or does your script actually contain this? If the latter then that is almost certainly the problem.

Also your script and command line have a slight difference. You leave out the "./" in the script. Are you running the script from the directory that contains the file, backuplist? Are you perhaps running this from cron and assuming it will know where to find backuplist? Were it me I'd specify the full path to where backuplist should be both on the find and on the cpio.

Also as an FYI. The file is unnecessary. You can type:
find /data/. | cpio -ov >/dev/st0

This will pipe the output of the find directly into the cpio command.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to use cpio to extract a cpio archive? linx win Debian 4 06-17-2005 01:53 PM
Running scripts bhmsi Linux - Newbie 6 04-23-2005 06:05 PM
Need help running scripts from scripts sdouble Linux - Newbie 3 05-31-2004 12:56 PM
Running scripts crash_zero Mandriva 5 04-19-2004 02:23 PM
Help Running Scripts josefalero Linux - Newbie 2 11-14-2002 04:36 PM

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

All times are GMT -5. The time now is 03:04 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration