LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-24-2012, 04:53 AM   #1
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,345

Rep: Reputation: 227Reputation: 227Reputation: 227
Post crw format


hi guys, i tried to issue a command ls -l /dev/st0

and it has this output:

crw-rw---- 1 root disk 9, 0 Feb 4 17:34 /dev/st0

what is crw-rw? and how do i read the contents of the tape?

please help. thanks in advance.
 
Old 04-24-2012, 04:58 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,773

Rep: Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888
man ls will explain what is displayed
probably you can use tar to read tape (see man tar)
 
Old 04-24-2012, 05:16 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390
Hi,

The ls man page does explain the read, write and execute parts, but does not mention file types (crw-rw-).

Have a look here: Unix file types and possibly this: Device file

Hope this helps.
 
Old 04-24-2012, 05:17 AM   #4
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Quote:
crw-rw---- 1 root disk 9, 0 Feb 4 17:34 /dev/st0
c represents a character special file. In this /de/st0 has this permission, user and group classes have the read and write permissions and others class do not have any permission.

This is the dat tape drive you're using. Checkout this link to use the dat tape drive - http://www.cyberciti.biz/faq/linux-t...command-howto/
 
1 members found this post helpful.
Old 04-24-2012, 05:18 AM   #5
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,345

Original Poster
Rep: Reputation: 227Reputation: 227Reputation: 227
hi, thanks for your reply.

had issued this commands to read the tape but still not able to read the contents.

xyz:/media # tar -tzf /dev/st0

gzip: stdin: not in gzip format
tar: Child died with signal 13
tar: Error exit delayed from previous errors

==========

xyz:/media # tar -tf /dev/st0

tar: This does not look like a tar archive
tar: Skipping to next header
tar: Archive contains obsolescent base-64 headers
tar: Error exit delayed from previous errors
xyz:/media #

any ideas? please help.
 
Old 04-24-2012, 05:28 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390
Hi,

I don't have any experience using tar to extract from tape, but I do know that the f option tells tar to use a file. /dev/st0 isn't a file and you do need to get rid of the f option.

Have a look here: Using tar (most examples use the f option, scroll halfway down the page).

Hope this helps.
 
Old 04-24-2012, 05:28 AM   #7
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
For reading the tape drive using tar -tzf /dev/st0 command, first you have to rewind the tape -

Code:
# mt -f /dev/st0 rewind
 
Old 04-24-2012, 05:29 AM   #8
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,773

Rep: Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888
Quote:
Originally Posted by druuna View Post
Hi,

The ls man page does explain the read, write and execute parts, but does not mention file types (crw-rw-).

Hope this helps.
sorry, I do not know which man did you try, I found it in the man page:
The first character can be one of the following:

d The entry is a directory.

D The entry is a door.

l The entry is a symbolic link.

b The entry is a block special file.

c The entry is a character special file.

p The entry is a FIFO (or "named pipe") special
....
 
Old 04-24-2012, 05:44 AM   #9
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390
Hi,
Quote:
Originally Posted by pan64 View Post
sorry, I do not know which man did you try, I found it in the man page:
Both the man page on LFS and on RHEL 6 don't mention this. An on-line search also comes up with multiple ls man pages that do not mention this information (haven't found one that does).

Which man page are you using?

EDIT: Don't you mean: info ls instead of man ls?

Last edited by druuna; 04-24-2012 at 05:46 AM.
 
Old 04-24-2012, 06:28 AM   #10
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,773

Rep: Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888
Quote:
Originally Posted by druuna View Post
Hi,
Both the man page on LFS and on RHEL 6 don't mention this. An on-line search also comes up with multiple ls man pages that do not mention this information (haven't found one that does).

Which man page are you using?

EDIT: Don't you mean: info ls instead of man ls?
What a surprise: it is man ls on solaris 5.10 sparc.
 
Old 04-24-2012, 07:51 AM   #11
michaelk
Moderator
 
Registered: Aug 2002
Posts: 16,325

Rep: Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907
Do you know how or what application was used to create the data on tape?
 
Old 04-24-2012, 11:56 PM   #12
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,345

Original Poster
Rep: Reputation: 227Reputation: 227Reputation: 227
Cool

Quote:
Originally Posted by michaelk View Post
Do you know how or what application was used to create the data on tape?
hi michael, thanks for asking. Yes you're right I should have check what application was used to create and I realize it already.
This command was used to create:


0 3 * * 1-5 find /home/mybackupfolder -depth | cpio --create --format=crc > /dev/st0

but i had tried to read the tape using this command:

cpio -civt < /dev/st0

i'm using putty to connect to the server but putty does nothing for about a minute so i suppose it's not working.
so i just press ctrl + c, to terminate the command.

Do i need to have more patience to wait or it could be that the tape is not working already?

Thanks for any advice.
 
Old 04-25-2012, 02:33 AM   #13
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,773

Rep: Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888
do you know how long does that backup take? Probably reading the tape will need the same amount of time.
 
Old 04-25-2012, 07:34 AM   #14
michaelk
Moderator
 
Registered: Aug 2002
Posts: 16,325

Rep: Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907
Have you previously Read/write to the tape drive successfully?
What is the output of the command
mt -f /dev/st0 status

Also try:
cpio -civ -F /dev/st0
 
Old 04-26-2012, 10:34 PM   #15
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,345

Original Poster
Rep: Reputation: 227Reputation: 227Reputation: 227
hi guys, i change the crontab from cpio to tar tar -czf command to create the backup, i'm able to read the file using this command: tar -tzf /dev/st0

this is the output:

comp-12:~ # tar -tzf /dev/st0
mybackupfolder/
mybackupfolder/diff/
mybackupfolder/diff/F20120330T150006Z.zip
mybackupfolder/diff/I20120419T150008Z.1.zip
mybackupfolder/diff/F20120413T150000Z.1.zip
mybackupfolder/diff/F20120413T150000Z.2.zip
mybackupfolder/diff/F20120413T150000Z.3.zip
mybackupfolder/diff/F20120413T150000Z.4.zip
mybackupfolder/diff/F20120413T150000Z.5.zip
mybackupfolder/diff/F20120413T150000Z.6.zip
mybackupfolder/diff/F20120413T150000Z.7.zip

thanks for all the help

Last edited by JJJCR; 04-26-2012 at 11:24 PM. Reason: update post
 
  


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
[SOLVED] can't debug with gdb: not in executable format: File format not recognized (squeeze) oddiofile Debian 1 08-24-2010 04:21 AM
[SOLVED] Simple Linux script to convert datetime format to UTC format shayno90 Linux - Newbie 10 10-09-2009 09:19 AM
digikam CRW raw plug in toneill Linux - Software 1 07-28-2007 09:05 AM
benq crw 4012 firmware upgrade brotkasten Linux - Hardware 0 12-09-2003 12:23 PM
Format Problems Saving Star Office Docs in Word Format kkempter Linux - Software 4 08-27-2003 05:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:42 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration