Assume the directory contains three text files: file1.txt
, file2.txt
, file3.txt
.
Command: ls
file1.txt file2.txt file3.txt
Command: rename "s/.txt/.cpp/" *.txt
.txt
files to .cpp
.file1.cpp
, file2.cpp
, file3.cpp
.file1.cpp file2.cpp file3.cpp
Command: ls
file1.cpp file2.cpp file3.cpp
Command: mkdir demo
demo
.Command: cd demo/
demo
directory.Command: ls
demo
directory is empty.(empty)
Command: cat > target.txt
target.txt
with content: Hello, this is target.txt
.Command: cat target.txt
Hello, this is target.txt
Command: ls -l -i
target.txt
has inode 1001
.1001 -rw-r--r-- 1 user user 24 Apr 14 14:00 target.txt
Command: ln target.txt link.txt
link.txt
to target.txt
. Both share inode 1001
.