Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 2. The Basics > Create a New, Empty File

Create a New, Empty File

touch

But that’s not the main reason many people use touch. The command has an interesting effect if you try to use the touch command on a file that doesn’t exist: It creates an empty file using the name you specified.

$ ls -l ~/

drwxr-xr-x   848 2005-10-19 11:36 src
drwxr-xr-x   632 2005-10-18 12:25 videos

$ touch test.txt
$ ls -l ~/

drwxr-xr-x   848 2005-10-19 11:36 src
-rw-r--r--     0 2005-10-19 23:41 test.txt
drwxr-xr-x   632 2005-10-18 12:25 videos


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint