Search This Blog

Sunday, 5 October 2014

File Creation, Copy & Deletion Commands

 File Creation, Copy & Deletion Commands

To create a file using Touch Command
touch /etl/IS/Data/archive/Filename_test.txt
This command creates a file with zero kB size

To modify the time of a file along with the modification of size to zero kB.

touch -m -t timestamp /etl/IS/Data/archive/Filename_test.txt
timestamp format----> YYYYMMDDHHMM

 To remove a file using rm command

rm path/filename.txt
rm command removes the specified file from a directory.
To copy a file to another folder

cp path1/filename.txt path2/filename.txt
(Same filename, but different path)
cp path/filename1.txt path/filename2.txt
(Different filename, but same path)
cp command copies a file from one path to another or copies a file to same folder with another filename.


No comments:

Post a Comment