The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Replacing character in file with null value HLee1981 Shell Programming and Scripting 18 07-18-2006 10:33 AM
Find null fields in file rahulrathod Shell Programming and Scripting 2 06-23-2006 01:17 AM
Null values after emptying a log file kasie4life Shell Programming and Scripting 2 10-07-2004 06:36 AM
Creating a file / /dev/null 435 Gavea UNIX for Dummies Questions & Answers 8 10-15-2003 02:27 PM
mv /dev/null file raj8 UNIX for Dummies Questions & Answers 3 07-17-2003 01:36 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-20-2007
Registered User
 

Join Date: Feb 2007
Location: Pune, Dehradun (INDIA), Michigan(US)
Posts: 187
Stumble this Post!
/dev/NULL can't open this file ??

when i write the following two statements :
cp /dev/NULL /clocal/mqbrkrs/user/mqsiadm/sanjay/dspmq_temp
cat /dev/NULL > /clocal/mqbrkrs/user/mqsiadm/sanjay/dspmq_temp

its gives me errors like :
cp: /dev/NULL: A file or directory in the path name does not exist.
cat : /dev/NULL can't open the file.

I am using AIX 5.0,
Tell me if you have any answers or clue to solve this.

Is there any other way to make a file clear or make its size of 0 bytes?
ASAP.

Thanks.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 08-20-2007
Ygor's Avatar
Moderator
 

Join Date: Oct 2003
Location: -31.96,115.84
Posts: 1,243
Stumble this Post!
You should use /dev/null , i.e all lowercase, but to empty a file, just use
Code:
> /clocal/mqbrkrs/user/mqsiadm/sanjay/dspmq_temp
Reply With Quote
  #3 (permalink)  
Old 08-20-2007
Registered User
 

Join Date: Feb 2007
Location: Pune, Dehradun (INDIA), Michigan(US)
Posts: 187
Stumble this Post!
ANother Q

Means if we have path of a file in a variable then we can use like this..
to clear the file / make the empty file.

FILEPATH=/clocal/mqbrkrs/user/mqsiadm/sanjay/dspmq_temp
> "$FILEPATH"


Thanks buddy !!
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:12 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0