file copy thru sash shell


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers file copy thru sash shell
# 1  
Old 07-14-2003
Question file copy thru sash shell

I accidentally assigned a password to the root user on this system and I don't remember what it was.. I was messing around with commands trying to learn the OS.

I have an old Indy R5000 system and I do not have a working cd drive for it to run the irix installation.

I booted into the PROM monitor which has a version sash shell and I have been attempting to access the harddrive thus this to copy my original passwd file back to etc/passwd but when i use the cp command to copy the file over I get and IO error.

I have been using the commands:
boot -f dksc(0,1,8)sash
to boot sash from the system partition

then once sash isloaded I get access to the os load partition

The version of sash is 6.2 ARCS.

Is there a way to do a sucessful file copy thru this?
# 2  
Old 07-15-2003
According to this web page, you should be able to copy (although it's not recommended).

Everything else I found mentions using the cdrom drive except one that said to pull the drive, put it into another IRIX system, mount it and edit the /newmount/etc/passwd file (where newmount is where you actually mounted it).

Of course, you probably don't have another IRIX system - in which case, you are back to square one.
# 3  
Old 07-15-2003
Thanks RTM,
You are right this is the only irix system I have...

I cannot seem to find any information telling me why the cp command would give me an io error, all the sites I have looked at says cp should work fine on the drive.

I can read the files correctly but then I want to copy to a file I get

xfs: cannot open file for writing
canot open: scsi(0)disk(1)rdisk(0)partition(0)/etc/passwd

but I can cat that same file to the screen..

I have tried adding BOOTMNT=RW to the env but that made no difference.. unless I am doing it wrong
Smilie
# 4  
Old 07-15-2003
Here is something to try.
# 5  
Old 07-15-2003
Hmmm...

I have tried loading in single user mode as the site suggests, but when I do that it asks me to give the root password for single user mode..

I can login as guest and demo but I cannot do anything in those user modes
Smilie
# 6  
Old 07-15-2003
oops looks like I may have fubared the system!

IDE Boot failed.
scsi(0)disk(1)rdisk(0)partition(6)/stand/ide: media not loaded.


for some reason I tried copying the sash shell to dksc(0,1,0) and it actually worked! then right after it no longer acknowledged the exsistance of that drive..

the exact comand I used was..

cp -b 32k dksc(0,1,8)/sash dksc(0,1,0)

that wouldn;t replace the whole drive would it? Should I have specidied a file and path in the destination?
# 7  
Old 07-15-2003
RTM's link says that it works for raw disks. My guess is that the syntax you used did indeed do just that.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help in UNIX shell to copy part of file name to new file name

Hi, I want to do the following in a Unix shell script and wonder if someone could assist me? I want to take files in a specific directory that start with the name pxpur012 and copy them to the same directory with the file name not containg pxpur012. For example, I have files like... (4 Replies)
Discussion started by: lnemitz
4 Replies

2. Shell Programming and Scripting

ksh shell scripting to copy a file

Hi. I am a new Unix admin and I've been tasked to write a ksh script that copies my .profile into my /home directory on all servers. I'm new to this and having a difficult time scripting it. Any ideas? (6 Replies)
Discussion started by: david_tech
6 Replies

3. Shell Programming and Scripting

Shell script to copy particular file from directories recursively

I have directory path in which there are several sub directories. In all these sub dir there will be one env.cnf file. I want to copy this env.cnf file from each sub dir's and place them in destination path by creating same filename as sub dir_env.cnf. After copying env.cnf files from source... (4 Replies)
Discussion started by: Optimus81
4 Replies

4. UNIX for Dummies Questions & Answers

How to use sed to copy specific lines from a file using shell variables?

hello! I am trying to use sed to copy specific set of lines from a file for which the starting and ending line numbers of the lines to be copied are stored in shell variables. How can i copy those lines? if the input_file is something like this and if the following is the script a=2 b=4... (4 Replies)
Discussion started by: a_ba
4 Replies

5. Shell Programming and Scripting

Shell script to copy file

Dear all, I have a database with thousands of files with the structure of name is: Filename_hour_year.abc Filename_hour_year_1.abc .............. So what I need is how to write a script that all file with contain the character "_1" will copy to "_2" For example: file name:... (7 Replies)
Discussion started by: hainguyen1402
7 Replies

6. Shell Programming and Scripting

Solaris KSH shell script to copy all lines from one file to another

Hello, more of a windows wscript guy. However I took a new position that requires me to support some solaris servers. So... issue is that I need to copy all lines from a file to a temporary file and then copy them back into the original file starting at line 1. Reason I need to do this is... (5 Replies)
Discussion started by: ZigZaggin
5 Replies

7. Shell Programming and Scripting

Shell Script - Copy File at intervals

Hi, I want to copy some files from a Folder say, /usr/X at random intervals to another location. Basically, new files will be dumped at random intervals to location /usr/X and I have to copy those new files to some other location (after copying, I cannot delete those files from source... (2 Replies)
Discussion started by: angshuman_ag
2 Replies

8. Shell Programming and Scripting

Help with a shell script to modify one line and copy the next 9 to same file

Hi everyone, the problem is quite simple, yet I can't find an easy solution using awk. I need to search for a string in $3, then if I find this string, copy the line,modify $3, and copy the next 9 lines to the same file. My problem is in the copying of the lines... Finding and modifying... (5 Replies)
Discussion started by: Teroc
5 Replies

9. Shell Programming and Scripting

copy/rename file as date() unix/shell

File.jpg I want to copy and rename this as 2008-12-02.jpg I tried this copy File.jpg date '%y-%m-%d-%H:%M:%S'.jpg This doesnt work.... what do i do? (1 Reply)
Discussion started by: hdogg
1 Replies

10. UNIX for Dummies Questions & Answers

Shell script to search for text in a file and copy file

Compete noob question.... I need a script to search through a directory and find files containing text string abcde1234 for example and then copy that file with that text string to another directory help please :eek: (9 Replies)
Discussion started by: imeadows
9 Replies
Login or Register to Ask a Question