Can cat create new files?

079

Yes, the cat command can be used to create new files by redirecting output to a file that does not already exist. You can do this by using the > symbol. For example:

cat > newfile.txt

After running this command, you can type the content you want to include in newfile.txt. Once you are done, press Ctrl+D to save and exit. This will create newfile.txt with the content you entered.

0 Comments

no data
Be the first to share your comment!