Home
News Archive
links from external sites
Network
LDAP
Infrared Devices
Graphics
Gimp
creating an analog gauge image
OpenGL
Programming
C/C++
CGI
Secure programming
Misc
VI
System
PCMCIA
Security
Tips and Tricks
Browser plugins
Help out
Distributions specific
Gentoo
Fedora
contact
interesting sites
german sites
manpages
tools
FAQ
Sitemap
Imprint


Poll
Which screen resolution do you use?










poll results



Last additions:
using iotop to find disk usage hogs

using iotop to find disk usage hogs

words:

887

views:

197095

userrating:

average rating: 1.7 (102 votes) (1=very good 6=terrible)


May 25th. 2007:
Words

486

Views

252402

why adblockers are bad


Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

words:

161

views:

141385

userrating:

average rating: 1.4 (42 votes) (1=very good 6=terrible)


April, 26th. 2006:

How to force a check of the file systems

How to force a check of the file systems

words:

179

views:

33751

userrating:

average rating: 1.4 (62 votes) (1=very good 6=terrible)


Oct, 18th. 2005:

Sep, 5th. 2005:
Words

51

Views

43996

New website design online


Aug, 27th 2005:

You are here: System->Tips and Tricks

Protecting files with noclobber

This tip is for people who have ever hosed important files by using > when they meant to use >>. Add the following line to .bashrc:

set -o noclobber.
The noclobber option prevents you from overwriting existing files with the > operator.

Code Listing 1

% program > file2
bash: file2: cannot overwrite existing file

In some cases you may really want to overwrite the file. In this case, instead of turning noclobber off, you can use >! to force the file to be written.

Code Listing 2

% program >! file2 

From http://www.gentoo.org/news/en/gwn/20040614-newsletter.xml


rate this article:
current rating: average rating: 1.6 (462 votes) (1=very good 6=terrible)
Your rating:
Very good (1) Good (2) ok (3) average (4) bad (5) terrible (6)

back



system status display
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS -
Copyright 2004 S&P Softwaredesign
Valid XHTML1.0 : Valid CSS : Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0
- Powered by LeopardCMS -
- Copyright and legal notices -
Time to create this page: 55.6 ms