![]() |
|
|
|||||||
| Home | Forums | Register | Rules & FAQ | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Filesystems, Disks and Memory Questions involving NAS, SAN, RAID, Robotic Libraries, backups, etc go here. |
Other UNIX.COM Threads You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Maximum size of a file in unix | nagalenoj | UNIX for Dummies Questions & Answers | 3 | 08-16-2007 06:56 AM |
| file size different in unix and windows | the_learner | UNIX for Dummies Questions & Answers | 6 | 08-03-2007 06:51 AM |
| how to find the file size in unix | lmraochodisetti | UNIX for Advanced & Expert Users | 4 | 07-24-2006 04:20 AM |
| Unix file size - HP-UX | krishna7 | HP-UX | 2 | 07-18-2003 08:58 AM |
| Hp Unix file size problem | A Roberts | UNIX for Dummies Questions & Answers | 3 | 11-29-2001 04:50 AM |
![]() |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
unix file size becomes zero
Hi,
when can a unix library file size become zero? For example.: can mistyping this command -> /usr/ucb/ps -auxww|grep -i <process name> make the "ps" library file size to become zero or its contents to get deleted? Is there any other way that an inadvertant mistake could cause the file size to become zero? |
| Forum Sponsor | ||
|
|
|
|||
|
I don't see how that command could have wiped the ps binary as there is no redirection to a file, only a pipeline into another command. A useful trick in ksh is to set the noclobber option which prevents accidental overwrite of existing files -- even for root.
# set -o noclobber # /usr/ucb/ps -auxww 3589 > out # /usr/ucb/ps -auxww 3589 > out ksh: out: file already exists Use the >| syntax for force an overwrite: # /usr/ucb/ps -auxww 3589 >| out |
|||
| Google UNIX.COM |