go to  ForumEasy.com   
JavaPro
Home » Archive » Message


[Email To Friend][View in Live Context][prev topic « prev post | next post » next topic]
  Create / Delete File on Unix / Linux
 
Subject: Create / Delete File on Unix / Linux
Author: Unix
Posted on: 10/06/2011 09:22:33 PM

The cat command

To create a text file called foo.txt, enter:

$ cat > foo.txt
Hello world!
press CTRL+D to save file

To display file contents, type
$ cat foot.txt


The vi command
$ vi foo.txt
Hello world!
press Esc+:+x+Enter to save file

Note:
  • Usually, on most filesystems, creating a file requires write permission on the parent directory (and execute permission, in order to enter the directory in the first place)

    Replies:


    References:

  •  


     
    Powered by ForumEasy © 2002-2022, All Rights Reserved. | Privacy Policy | Terms of Use
     
    Get your own forum today. It's easy and free.