How to create a empty File in Linux
Well, it is realy simple to create a file in Linux, but some developers tend to use "special" commands to acheive it.
Here are the normal ones, I bet you know them:
touch $FILE echo -n "" > $FILE > $FILE # (for temporary files) mktemp ${FILE}.XXX
But these days I was confronted by a astonishing new solution to that problem:
cp /dev/null $FILE
I'd say 0 points for UNIX knowledge, 10 points for coolnes.
Kommentare
Ansicht der Kommentare: Linear | Verschachtelt