Tuesday, October 14, 2014

What are the important applications of touch command in linux?

If we write touch filename then only the time at which the file has been accessed gets changed in the linux records.This command doesn't open the file.

What other things can we do using touch command?

1. Creating an empty file

touch a.txt

2. Creating multiple empty files

touch a.txt b.txt c.txt

3. touch -a random.txt

touches the file random.txt and if the file is not present creates a new file with the name.

4. touch -c random.txt

touches the file random.txt and if the file is not present it doesn't create a new file.

5. touch -r random.txt alpha.txt

updates the timestamp of file alpha with the timestamp of file random.txt

6. touch -t 201410152030.40 random.txt

this command will give random.txt file a timestamp of 15th october 2014 and 8 30 PM and 40 seconds.

9 comments:

  1. Thank you for your post. This is excellent information. It is amazing and wonderful to visit your site.
    Ios app development in hyderabad
    Best ios training in hyderabad
    Iphone app development in hyderabad

    ReplyDelete
  2. IBM Certifications crack4sure Actually its very nice site! this is my first visit on this site my friend gave the link of this site! and site is really great

    ReplyDelete
  3. Prepare4test, proudly, have 47037+ Satisfied Customers who passed their respective I.T. Exams utilizing our exam preparatory material.

    ReplyDelete
  4. I am talking from my personal experience. If you want to pass the CompTIA SY0-601 exam, then try out these CompTIA SY0-601 Questions. These are real questions and helped me pass the exam in the first attempt.

    ReplyDelete
  5. Very useful information regarding the NEBOSH course.
    It is more advantageous for you to begin your career with NEBOSH. You can get the Nebosh course in Dubai with our top leading institute. The Cosmic provides you with the most up-to-date information on the NEBOSH Course. Students are trained to have a thorough understanding of occupational health and safety.

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete
  7. HPE7-A01
    The HPE7-A01 Exam is a crucial assessment for IT professionals aiming to demonstrate their expertise in HPE Hybrid IT solutions. Covering topics like data center architecture, storage, and server solutions, this exam verifies candidates' ability to design and implement advanced infrastructure solutions to optimize business performance and resilience.

    ReplyDelete
  8. Superb post. Thanks for sharing such an wonderful post.
    Linux course in Pune

    ReplyDelete