OS - Ubuntu. I want to create file.txt in /home/z/Desktop , where the contents of the file are some text here .
The first and usual way starts nano /home/z/Desktop/file.txt and types some text here . after that press ctrl+x , press y and then Enter .
The second way: cat > /home/z/Desktop/file.txt , type some text here and press Enter and then ctrl+c
I hope I can run one line of the command to make it faster. I thought xdotool will work with cat (second method), but no, it does not work
source share