
The easiest way to create new file ( empty text file or txt file) on Fedora Linux system is using touch command. The touch command can be very useful to create new empty text file on Linux system. The touch command example below show the step to create empty text file on Fedora Linux system.
Create file with touch command example no.01:
1. Create new file named text_file.txt
[root@fedora ~]# touch text_file.txt
[root@fedora ~]#
2. List file in current directory to verify the creation of new text_file.txt
[root@fedora ~]# ls
anaconda-ks.cfg Download install.log.syslog Pictures text_file.txt
Desktop fedora9 mbox Public Videos
Documents install.log Music Templates
[root@fedora ~]#
3. Using the ll command to view long list file properties.
[root@fedora ~]# ll text_file.txt
-rw-r--r-- 1 root root 0 2008-07-23 05:04 text_file.txt
[root@fedora ~]#
Create files with touch command example no.02:
1. Create 3 files on one go with touch command.
[root@fedora ~]# touch text_files.txt new_files.txt file_example.txt
[root@fedora ~]#
2. Verify the files creation.
[root@fedora ~]# ls
anaconda-ks.cfg fedora9 mbox Public
Desktop file_example.txt Music Templates
Documents install.log new_files.txt text_files.txt
Download install.log.syslog Pictures Videos
[root@fedora ~]#
3. Using the ll command to view long list files properties.
[root@fedora ~]# ll text_files.txt new_files.txt file_example.txt
-rw-r--r-- 1 root root 0 2008-07-23 05:00 file_example.txt
-rw-r--r-- 1 root root 0 2008-07-23 05:00 new_files.txt
-rw-r--r-- 1 root root 0 2008-07-23 05:00 text_files.txt
[root@fedora ~]#
touch Command Example:
# touch text_file.txt
# touch text_file.txt new_files.txt file_example.txt
Note: The ll command is equal to ls -l ( alias ll='ls -l --color=auto')
0 comments:
Post a Comment