Sponsored Content
Top Forums UNIX for Dummies Questions & Answers cat binary file -> terminal gibberish Post 50474 by norsk hedensk on Sunday 25th of April 2004 10:26:49 AM
Old 04-25-2004
there is also a 'reset' command...
 

8 More Discussions You Might Find Interesting

1. Solaris

compiled binary file gives "cannot execute binary file"

Hi, I have two Solaris machines. 1. SunOS X 5.8 Generic_108528-29 sun4u sparc SUNW,Sun-Blade-1500 2. SunOS Y 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-60 I am trying to buiild a project on both these machines. The Binary output file compiled on machine 2 runs on both the machines. Where... (0 Replies)
Discussion started by: scgupta
0 Replies

2. UNIX for Dummies Questions & Answers

Difference between cat , cat > , cat >> and touch !!!

Hi Can anybody tell the difference between Difference between cat , cat > , cat >> and touch command in UNIX? Thanks (6 Replies)
Discussion started by: skyineyes
6 Replies

3. Shell Programming and Scripting

cat in the command line doesn't match cat in the script

Hello, So I sorted my file as I was supposed to: sort -n -r -k 2 -k 1 file1 | uniq > file2 and when I wrote > cat file2 in the command line, I got what I was expecting, but in the script itself ... sort -n -r -k 2 -k 1 averages | uniq > temp cat file2 It wrote a whole... (21 Replies)
Discussion started by: shira
21 Replies

4. Solaris

Gibberish when unzipping files in Putty

Hello. I'm ingesting files from one system (db hosted on Solaris 10) to another (db hosted on Solaris 9). Files come in zipped, and contain various txt files, which I'll use SQL*Loader to load. The unzipping, loading etc. is all handled in a ksh shell script. Sadly, we use Putty for all our... (9 Replies)
Discussion started by: Ray Harilal
9 Replies

5. UNIX for Dummies Questions & Answers

gunzip outputs gibberish

I run cygwin on windows 7, and have been using the windows command line. I've been trying to gunzip some previously compressed large sequence output files in .txt.gz format. This worked for about the first 10 files and then for the rest of them the file (as viewed using the 'head' command) is... (1 Reply)
Discussion started by: woceht
1 Replies

6. Shell Programming and Scripting

Convert binary file to csv and then back to the binary format

Hello *nix specialists, Im working for a non profit organisation in Germany to transport DSL over WLAN to people in areas without no DSL. We are using Linksys WRT 54 router with DD-WRT firmware There are at the moment over 180 router running but we have to change some settings next time. So my... (7 Replies)
Discussion started by: digidax
7 Replies

7. UNIX for Dummies Questions & Answers

What happens when i write on terminal "cat /bin/ls" ?

i all, i'm trying to understand a code, i see this line cat /bin/ls that have a strange output...can someone explain me what is it? (2 Replies)
Discussion started by: Marina2013
2 Replies

8. Shell Programming and Scripting

Print Terminal Output Exactly how it Appears in the Terminal to a New Text File

Hello All, I have a text file containing output from a command that contains lots of escape/control characters that when viewed using vi or view, looks like jibberish. But when viewed using the cat command the output is formatted properly. Is there any way to take the output from the cat... (7 Replies)
Discussion started by: mrm5102
7 Replies
SG_RESET(8)							     SG3_UTILS							       SG_RESET(8)

NAME
sg_reset - sends SCSI device, target, bus or host reset; or checks reset state SYNOPSIS
sg_reset [-b] [-d] [-h] [-t] [-V] DEVICE DESCRIPTION
The sg_reset utility with no options (just a DEVICE) reports on the reset state (e.g. if a reset is underway) of DEVICE. When given a -d, -t, -b or -h option it requests a device, target, bus or host reset respectively. The ability to reset a SCSI target (often called a "hard reset" at the transport level) was added in linux kernel 2.6.27 . Low level driv- ers that support target reset hopefully reset a logical unit only when given the device reset (i.e. -d) option. This should removed the ambiguity of whether "device" meant LU or target that we have had in the past. In the linux kernel 2.6 series this utility can be called on sd, sr (cd/dvd), st or sg device nodes; if the user has appropriate permis- sions. In the linux kernel 2.4 series support for this utility first appeared in lk 2.4.19 and could only be called on sg device nodes. Various vendors made this capability available in their kernels prior to lk 2.4.19. OPTIONS
-b attempt a SCSI bus reset. This would normally be tried if the device reset (i.e. option -d) was not successful. -d attempt a SCSI device reset. If the device seems stuck, this is the first reset that should be tried. This assumes the linux scsi mid level error handler is not already in the process of resetting DEVICE. -h attempt a host adapter reset. This would normally be tried if both device reset (i.e. option -d) and bus reset (i.e. option -b) were not successful. -t attempt a SCSI target reset. This assumes the linux scsi mid level error handler is not already in the process of resetting the tar- get that contains the given DEVICE. -V prints the version string then exits. NOTES
The error recovery code within the linux kernel when faced with a SCSI command timing out and no response from the device (LU), first tries a device reset and if that is not successful tries a target reset. If that is not successful it tries a bus reset. If that is not success- ful it tries a host reset. Users of this utility should check whether such a recovery is already underway before trying to reset with this utility. The "device,target,bus,host" order is also recommended (i.e. first start with the smallest hammer). The above is a generalization and exact details will vary depending on the transport and the low level driver concerned. SAM-4 defines a hard reset, a logical unit reset and a I_T nexus reset. A hard reset is defined to be a power on condition, a microcode change or a transport reset event. A LU reset and an I_T nexus reset can be requested via task management function (and support for LU reset is mandatory). In Linux the SCSI subsystem leaves it up to the low level drivers as to whether a "device reset" is only for the addressed LU or all the LUs in the device that contains the addressed LU (i.e. a target reset). The additional of the target reset (i.e. option -t) should give more control in this area. The "bus reset" is a transport reset and may be a dummy operation, depending on the transport. A "host reset" attempts to re-initialize the HBA that the request passes through en route to the DEVICE. Note that a "host reset" and a "bus reset" may cause collateral damage. This utility does not allow individual SCSI commands (or tasks as they are called in SAM-4) to be aborted. SAM-4 defines ABORT TASK and ABORT TASK SET task management functions for that. Prior to SAM-3 there was a TARGET RESET task management function. Several transports still support that function and many associated linux low level drivers map the -t option to it. AUTHORS
Written by Douglas Gilbert. COPYRIGHT
Copyright (C) 1999-2009 Douglas Gilbert This software is distributed under the GPL version 2. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR- POSE. sg3_utils-1.28 July 2009 SG_RESET(8)
All times are GMT -4. The time now is 12:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy