# way1
cp -f /path/to/file1.txt /another/path/to/file1.txt
# way2
# If file2 does not exist, then file1 is renamed file2. If file2 exists, its contents are replaced with the contents of file1.
mv file1 file2
# If we want to just copy the contents we can use below
cat /path/to/file1.txt > /another/path/to/file1.txt
0 Comments
Please Login to Comment Here