Working with Files


« Previous
Next »

Working with files

» Files on linux or unix are case sensitive.
» Every things in linux is a file. A directory is a special kind of file.
» Each terminal window and any process are all represented some where in the file system as a file.
» The file utility determine the file type. Linux does not determine the file type.




touch

touch command are used to create an empty file.

Synopsis :
touch [option] file-names

Example :
touch   file1 file2

Option
-a   change access time only
-c   if the file does not exits, do not create it
-d   update the access and modification type
-m   change the modification time only
-t   create a file using a specific file



rm

the rm commands are used to remove (delete) files or directory.

Synopsis :
rm [option] file names

Example :
rm   generalnote

Option
-v   print the name of each file before removing it
-f   ignore nonexistent files, never prompt before removing
-i   prompt before every removal
-d   remove directory, if they are not empty
-r   remove recursively




« Previous
Next »