ファイルに含める内容に応じて:
touch /path/to/file
空のファイル-
somecommand > /path/to/file
コマンドの出力を含むファイルの場合。eg: grep --help > randomtext.txt echo "This is some text" > randomtext.txt
-
nano /path/to/file
またはvi /path/to/file
(またはany other editor emacs,gedit etc
)
既存のファイルを開いて編集するか、空のファイルが存在しない場合は作成して開いて入力します
タッチを使用
touch filename