02-04-2002
/dev/zero vs /dev/null
Since yall brought this up, I have a question.
What is the difference between. These two commands
1) cat /dev/null > somefile
2) cat /dev/zero > somefile
3) > somefile
Zeroing out a file.
I know that "dd can be used to create a file of X bytes for testing and to "hold" space in a filesytem and for doing "disk dumps" an d for destroying data on a disk ( not the prescribed method).
I think I know another reason for /dev/zero. That would be to zero out a disk for reuse.
Any insight would be informative.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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
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
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
i want to use the devfsadm command and understand its function (3 Replies)
Discussion started by: bondoq
3 Replies
5. Solaris
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
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
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
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
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
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
LEARN ABOUT REDHAT
gendiff
GENDIFF(1) General Commands Manual GENDIFF(1)
NAME
gendiff - utility to aid in error-free diff file generation
SYNOPSIS
gendiff <directory> <diff-extension>
DESCRIPTION
gendiff is a rather simple script which aids in generating a diff file from a single directory. It takes a directory name and a "diff-
extension" as its only arguments. The diff extension should be a unique sequence of characters added to the end of all original, unmodi-
fied files. The output of the program is a diff file which may be applied with the patch program to recreate the changes.
The usual sequence of events for creating a diff is to create two identical directories, make changes in one directory, and then use the
diff utility to create a list of differences between the two. Using gendiff eliminates the need for the extra, original and unmodified
directory copy. Instead, only the individual files that are modified need to be saved.
Before editing a file, copy the file, appending the extension you have chosen to the filename. I.e. if you were going to edit somefile.cpp
and have chosen the extension "fix", copy it to somefile.cpp.fix before editing it. Then edit the first copy (somefile.cpp).
After editing all the files you need to edit in this fashion, enter the directory one level above where your source code resides, and then
type
$ gendiff somedirectory .fix > mydiff-fix.patch
You should redirect the output to a file (as illustrated) unless you want to see the results on stdout.
SEE ALSO
diff(1), patch(1)
AUTHOR
Marc Ewing <marc@redhat.com>
4th Berkeley Distribution Mon Jan 10 2000 GENDIFF(1)