Sponsored Content
Full Discussion: HP-UX 10.20 devices
Operating Systems HP-UX HP-UX 10.20 devices Post 14681 by LivinFree on Tuesday 5th of February 2002 05:02:51 AM
Old 02-05-2002
A simple way of looking at it is to say:

cat /dev/null > my_file
will make my_file zero-length, whereas

cat /dev/zero > my_file
will fill the file with NULL characters...

$ dd if=/dev/zero of=/my/home/test_file bs=1 count=10
$ xd test_file
0000000 0000 0000 0000 0000 0000
000000a
$

Be carefull not to "cat" zero zero to anywhere, lest your filesystem fill up relatively quickly...
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unix devices

Hi I am trying to determine the access to unix devices. I found the follow access description which I have been told is a symbolic link and is not the actual file. I was also told that all symbolic links will have rwxrwxrwx access. kmem: lrwxrwxrwx 1 root 27 May 28 16:06 /dev/kmem ->... (2 Replies)
Discussion started by: GW01
2 Replies

2. Red Hat

USB Devices

I am trying to get a flash card reader to work with my machine. My question is, are all of my USB ports screwed up? Do I need to buy a seperate USB controller? I does not appear that the onboard USB ports work. In trying to get it to work, I typed cat /proc/scsi/scsi and got this: # cat... (2 Replies)
Discussion started by: davidkretsch
2 Replies

3. Solaris

Meta Devices

I have added a sun storage array from a faiulty server onto a new server and copied the md.conf files etc. I can now access the /dev/md/dsk file systems, but I want to delete some metadevices that do not exist (it still thinks the 0 and 1 (root /var /export) disk are mirrored. How do I do this? (8 Replies)
Discussion started by: ozzmosiz
8 Replies

4. Solaris

devices in solaris 10

i want to use the devfsadm command and understand its function (3 Replies)
Discussion started by: bondoq
3 Replies

5. Solaris

what is /devices/pseudo/ ??

Hi all, what does this mean? if then <something> fi here is what i know.. it checks if the specified argument no($devid) in some function call is made into a block device and then proceeds with the execution of the loop. However am not understand what lofi@0:means? also is there... (3 Replies)
Discussion started by: wrapster
3 Replies

6. UNIX for Dummies Questions & Answers

passthrough devices vs. named devices

I am having trouble understanding the difference between a passthrough device and a named device and when you would use one or the other to access equipment. As an example, we have a tape library and giving the command "camcontrol devlist" gives the following output: akx# camcontrol... (1 Reply)
Discussion started by: thumper
1 Replies

7. UNIX for Dummies Questions & Answers

/dev X /devices

Hi folks, I am trying to learn Unix based in Linux... In Linux, in /Dev are files related to cards, mouse, etc.. how about Unix? What is the difference between /Dev and /Devices? Thanks, Fernanda (0 Replies)
Discussion started by: ffpradella
0 Replies

8. HP-UX

list of devices

Hi, I need to rediracte all the names of the devices (only disks) to a file. Thanks:confused: (3 Replies)
Discussion started by: yoavbe
3 Replies

9. Programming

Raw devices in C

Hi guys. what is the benefits of using raw devices in programming? which applications mostly use raw devices? how can i use raw devices in C programs? is there any system calls or library functions? (1 Reply)
Discussion started by: majid.merkava
1 Replies

10. Red Hat

Raw Devices

Can you please modify my script. This script is not working for i in /dev/sdf do /bin/raw /dev/raw/`/bin/basename ${i}` ${i} /bin/sleep 2 /bin/chown orasm:ordba /dev/raw/`/bin/basename ${i}` /bin/chmod 660... (9 Replies)
Discussion started by: karthik9358
9 Replies
CD(9)							   BSD Kernel Developer's Manual						     CD(9)

NAME
cd -- CDROM driver for the CAM SCSI subsystem DESCRIPTION
The cd device driver provides a read only interface for CDROM drives (SCSI type 5) and WORM drives (SCSI type 4) that support CDROM type com- mands. Some drives do not behave as the driver expects. See the QUIRKS section for information on possible flags. QUIRKS
Each CD-ROM device can have different interpretations of the SCSI spec. This can lead to drives requiring special handling in the driver. The following is a list of quirks that the driver recognize. CD_Q_NO_TOUCH This flag tells the driver not to probe the drive at attach time to see if there is a disk in the drive and find out what size it is. This flag is currently unimplemented in the CAM cd driver. CD_Q_BCD_TRACKS This flag is for broken drives that return the track numbers in packed BCD instead of straight decimal. If the drive seems to skip tracks (tracks 10-15 are skipped) then you have a drive that is in need of this flag. CD_Q_NO_CHANGER This flag tells the driver that the device in question is not a changer. This is only necessary for a CDROM device with multiple luns that are not a part of a changer. CD_Q_CHANGER This flag tells the driver that the given device is a multi-lun changer. In general, the driver will figure this out auto- matically when it sees a LUN greater than 0. Setting this flag only has the effect of telling the driver to run the initial read capacity command for LUN 0 of the changer through the changer scheduling code. CD_Q_10_BYTE_ONLY This flag tells the driver that the given device only accepts 10 byte MODE SENSE/MODE SELECT commands. In general these types of quirks should not be added to the cd(4) driver. The reason is that the driver does several things to attempt to determine whether the drive in question needs 10 byte commands. First, it issues a CAM Path Inquiry command to determine whether the protocol that the drive speaks typically only allows 10 byte commands. (ATAPI and USB are two prominent exam- ples of protocols where you generally only want to send 10 byte commands.) Then, if it gets an ILLEGAL REQUEST error back from a 6 byte MODE SENSE or MODE SELECT command, it attempts to send the 10 byte version of the command instead. The only reason you would need a quirk is if your drive uses a protocol (e.g., SCSI) that typically does not have a problem with 6 byte commands. FILES
/sys/cam/scsi/scsi_cd.c is the driver source file. SEE ALSO
cd(4), scsi(4) HISTORY
The cd manual page first appeared in FreeBSD 2.2. AUTHORS
This manual page was written by John-Mark Gurney <jmg@FreeBSD.org>. It was updated for CAM and FreeBSD 3.0 by Kenneth Merry <ken@FreeBSD.org>. BSD
March 25, 2014 BSD
All times are GMT -4. The time now is 11:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy