Languages
[Edit]
EN

Bash - create new file under linux command

8 points
Created by:
Marcin
15710

1. With touch command:

$ touch path/to/file 
Note: created file will be empty

2. With nano or pico program:

$ nano path/to/file
$ pico path/to/file
Note: After typing data use ctrl^o (ctrl+o) to save file file and ctrl^x (ctrl+x) to close program.

3. With echo and output redirection to file:

$ echo "this is my text that i would like to save to file" > path/to/my/file 

4. With cat program:

$ cat > path/to/my/file
Note: Enter key causes saving of current line. Use ctrl^c (ctrl+c) to close program.
Native Advertising
50 000 ad impressions - 449$
🚀
Get your tech brand or product in front of software developers.
For more information contact us:
Red dot
Dirask - friendly IT community for everyone.

❤️💻 🙂

Join