However, it is always a good practice to log all kind of messages in your log. This can help you find if anything is messed up.
I guess you must be knowing about redirection, but still since this question is related to that let me explain what exactly the 2>/dev/null do
well 2 stands for the file descriptor, standard errors. so any errors that are directed to standard error are written in file descriptor 2. by doing 2> you are asking to redirect the standard errors. /dev/null is a null device. so 2>/dev/null is instructing to direct standard errors to a null device instead of the console or your error log
other standard file descriptors are
0 standard output
1 standard input
one more remark i feel "done < /path/to/file/$file1" is redundant, you may discard it as well since you are already doing a "cat < /path/to/file/$file1"
let me make this a bit more straight, (if i havent misinterpreted what you intend to do)
cat /path/to/file/$file1 | while read a
do
mv /path/to/data/"$a" /path/to/new/location 2>/dev/null
echo "Moved File" $a" >>/path/to/file/logs/filesmoved$year$month$day.txt 2>/dev/null
done
while read a
do
var1=`echo "$a"`
mv /path/to/data/"$var1" /path/to/new/location #Use double quote
echo "Moved File" $var1 >> /path/to/file/logs/filesmoved$year$month$day.txt
done < /path/to/file/$file1 # No need to cat file in first line if you have this line.
Hello...
i got an error in my SCO OpenServer 6. the error is:
msgcnt 1 vxfs: mesg 016: vx_ilisterr - / file system error reading inode 373
Can anyone help me? (1 Reply)
Hi - I am getting the error
`Error reading response length from authentication socket'
when I ssh from my cluster to another cluster, and then back to my cluster. It doesn't seem to affect anything, but it's just annoying that it always pops up and tends to confuse new users of the cluster. I... (1 Reply)
Hello
I got this message error on my box with linux red hat
2887a374 WsServer E WSVR0009E: Error occurred during startup
Do you know what does that mean !
Thanks in advance (1 Reply)
Hi,
I'm trying to install Solaris 10 on my Ultra 10 but it won't boot. I tried an original cd and a downloaded one. I got the following error:
"error reading sectors" (yes, i checked the md5 sums)
For the complete error see the following shot:
... (2 Replies)
I keep getting an error message in a script im writing, this line is allways pointed out.
if
and this is the message i keep getting.
line 32: [: 8: unary operator expected
Whats wrong with it?
Please Help. (5 Replies)
Hi,
My Solaris 5.8 system keeps getting this error at boot -
"Can't set vol root to /vol"
then
/usr/sbin/vold: can't set vol root to /vol: Resource temporarily unavailiable
Any idea what is wrong, and how do I fix it? (1 Reply)
Hi,
My Solaris 5.8 system keeps getting this error at boot -
"Can't set vol root to /vol"
then
/usr/sbin/vold: can't set vol root to /vol: Resource temporarily unavailiable
Any idea what is wrong, and how do I fix it? (0 Replies)
When I try to list a directory that I have been using rsync to copy, I now am getting the following message.
root # ls -alt /directory
ls: /directory: Value too large to be stored in data type.
total 0
I can change directory and list the contents of directories within /directory, but I... (2 Replies)