Linux: Create New File
Create a new file
touch fileName
-
- Create a new file with empty content.
- If the file exists already, just update its timestamp.
Create a new file link
ln -s existingPath newPath
-
Create a file at newPath that is a symbolic link to another file.
(symbolic link, aka soft link, is a file whose content is a file path to another file.)
ln existingPath newPath
-
Create a file at newPath that is a hard link of a file.
(Hard link is a “normal” file. A file may have many hard links.)
Linux, Files and Dirs
- Linux: Navigate Directory
- Linux: List Files
- Linux: Walk Dir: find, xargs
- Linux: View Directory as Tree
- Linux: Copy File
- Linux: Move or Rename File
- Linux: Create New File
- Linux: Create New Dir
- Linux: Delete File or Dir
- Linux: Show Directory Size: du
- Linux: Show Difference Between Directories
- Linux: rsync Tutorial