03-08-2011
Yes, it's a special syntax for file redirection. &>N to write to a specific file descriptor, or &<N to read from a specific file descriptor, where N is an integer representing a valid file descriptor. Standard input is zero, standard output is 1, standard error is 2, anything else can vary.
To read or write from files, you omit the &.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
suppose you have the following line at your crontab :
5 * * * * /usr/mine/script > /dev/null 2>&1
now i understood that the " > /dev/null 2>&1 outputs both Standard outpout and Standard Error messages to the /dev/null device or file...
the first part , " > /dev/null " transfers... (1 Reply)
Discussion started by: BAM
1 Replies
2. UNIX for Dummies Questions & Answers
Hi ,
I am importing some table from /dev/null i dont understand what is /dev/null
Sorry i am new to UNIX
sam71 (3 Replies)
Discussion started by: sam71
3 Replies
3. Shell Programming and Scripting
hello all,
In many shell scripts i found '> /dev/null' , i am not able to get this,
will any one please explain why we are using this.
thanks
sudha (2 Replies)
Discussion started by: rrs
2 Replies
4. Solaris
Hi, Anyone can help
My solaris 8 system has the following
/dev/null , /dev/tty and /dev/console
All permission are lrwxrwxrwx
Can this be change to a non-world write ??
any impact ?? (12 Replies)
Discussion started by: civic2005
12 Replies
5. Shell Programming and Scripting
Hi,
I am new into UNIX shell scripting and I am wondering what is the meaning of the below text which appears at the end of each line in the ".sh" file:
> /dev/null 2>&1
For example, the line below:
sh $HOME/stats/Rep777/Act_777.sh omc omc > /dev/null 2>&1
I know for sure what "sh... (10 Replies)
Discussion started by: salanalani
10 Replies
6. Shell Programming and Scripting
Does >/dev/null 2>&1 and 2>&1 >/dev/null mean the same? (4 Replies)
Discussion started by: proactiveaditya
4 Replies
7. Shell Programming and Scripting
I apologize if this question has been answered else where or is too elementary.
I ran across a KSH script (long unimportant story) that does this:
if ; then
CAS_SRC_LOG="/var/log/cas_src.log 2>&1"
else
CAS_SRC_LOG="/dev/null 2>&1"
fithen does this:
/usr/bin/echo "heartbeat:... (5 Replies)
Discussion started by: jbmorrisonjr
5 Replies
8. Shell Programming and Scripting
Hello All and a Happy New year to yous guys.
I'm running the below command on my AIX box and it keeps giving me the message that the file doesn't exist. I know the file don't exist, but I don't want to see the error. 2>/dev/null doesn't work.
bash-3.00$ ls -l C* | wc -l 2>/dev/null
ls:... (2 Replies)
Discussion started by: bbbngowc
2 Replies
9. AIX
Hello
Can I just remove/delete flile ?
rw-r--r-- 1 root system 2385088512 Jun 30 21:25 /dev/null 2>&1
size of this flile is 2274.75 m and fill up my filesystem:
Filesystem MB blocks Used Free %Used Mounted on
/dev/hd4 2560.00 2558.59 1.41 100% / (10 Replies)
Discussion started by: primo102
10 Replies
10. AIX
Hello,
Does anyone know how to housekeeping the null 2>&1 file in /dev?
its fill up my system, please help.
Thanks :b: (3 Replies)
Discussion started by: only
3 Replies
LEARN ABOUT DEBIAN
dd_driver
dd_driver(3) globus xio dd_driver(3)
NAME
dd_driver - Data descriptors globus_xio uses data descriptors to associate meta data with the data being writen or the data read.
Data descriptors flow into the drivers read and write interface functions by way of the operation structure. If the driver is interested in
viewing the data decriptor it can request it from the operation structure via a call to globus_xio_driver_operation_get_data_descriptor()
and it can view any driver specific data descriptor via a call to globus_xio_driver_data_descriptor_get_specific(). The driver can modify
values in the data descriptor by setting values before passing the request down the stack. Several functions are available to modify the
data descriptors. There is no need to 'set()' the data descriptors back into the operation. The functions for manipluating the values in a
DD affect the values xio has directly.
Data descriptors flow back to the driver in the callbacks for the data operations. When calling finished operation on a data operation the
driver must pass in a data descriptor. It should get this data descriptor from the io operation callback.
Life Cycle:
Passing in a data descriptor: A data descriptor is first created by the globus_xio user. The user can add driver specific data descriptors
to it. Once the usre has created and set the attributes on its data descriptor to their liking they pass it into a globus_xio data
operation (either read or write). When the data descriptor is passed on globus_xio will make an internal copy of it. It does this by first
coping the user the level data descriptor and then walkinging through the list of driver specific data descriptor contianed in to and
requesting the the driver make a copy of the driver specific data descriptor. If ever a driver specific data descriptor is NULL globus_xio
need not call into its drivers dd_copy function. If ever the user level data descriptor is NULL globus_xio need not deal with the data
descriptor functionality at all.
A data descriptor coming back up the stack Once an io operation reachs the transport driver (the bottom of the stack) it takes on a
slightly different role. On the way in it is describing what is requested to be done with the data, on the way out it is describing what
has actually been done. Once the transport driver performs the operation it should adjust the data descriptor to reflect what has actually
happened (few drivers will need to worry about this). Each driver on the way up can adjust the data descriptor and its driver specific data
decriptor. When xio reachs the the top of the stack it calls a user callback. When that callback returns all memory associated with the
data descriptor is cleaned up. The interface function globus_xio_driver_data_descriptor_free() is used for this.
Version 3.3 Mon Apr 30 2012 dd_driver(3)