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: