+ 2
Hey everyone , if anyone knows about linux cammands then tell me " how to add text or content in file " using linux cammand ?
Answer me 😩
5 Respostas
+ 1
cat > name_of_the_file.txt
Enter the text
Press ctrl+d when done to save
+ 1
Also you will need software like termux that
is basically a shell and whatever command you type let's you make use of services provided by os, download termux from playstore
Did you searched on Google? Seems like you didn't ,you need a text editor ,use vim or Emacs or whichever you prefer ,I have been using vim , works fine for me and easy to understand ,
pkg install vim
vim filename
there are two modes in vim ,normal mode where you can enter commands and insert mode that let's you write text ,press i to go into insert mode and esc to go into normal mode ,rest you can learn about all the vim commands from the tutorials available on net
for your use case I don't think you need vim
just do
cat filename and it will open up file to enter text but if you want to deal with extra stuff you can use a editor
+ 1
Bro i was referring to Linux comments
+ 1
Okay I got my answer👍 , By using cat cammand
Syntax :cat>filename.extension
0
Maybe this can help you.
https://linuxhint.com/writing_files_java/