What is the simplest way to create a file using a command-line? Usually I use:
But is this the simplest/fastest way?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
This will save you five keypresses relative to
but is not the equivalent of
touch as it will truncate filename if it exists. The following does what you want
but note that it is not equivalent to
touch either, as it does not update filename's modification timestamp.