As mentioned earlier, one of the primary uses of touch is to create new, empty files.Examples of the touch command in Linux touch command in Linux Basic Examples The following examples will teach you everything you need to know about the touch command, and the advanced section will show you some lesser used options that may come in handy every once in a while. The touch command has a simple syntax and a very simple purpose, so it doesn’t take long to learn. $ – requires given linux commands to be executed as a regular non-privileged user # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command Privileged access to your Linux system as root or via the sudo command. Requirements, Conventions or Software Version Used Touch command in Linux with examples Software Requirements and Linux Command Line Conventions Category Follow along below to see learn about the various options that you can use with this command. In this guide, you’ll learn how to use the touch command in Linux through examples. If you want to manipulate this sorting, without actually editing any files, touch can be used to update the modification time with any date and time that you supply. Other scenarios where touch proves useful is in applications that sort files according to their modification time. Some service, which an administrator is configuring, requires a certain file to be created before the service can start and, sometimes, this file may need to have certain access time stamp. When working with a Linux operating system, sometimes a need arises to create an empty file. Many users will find themselves using the touch command every once in a while, or maybe even quite often. It’s also a super handy way to create an empty file very quickly, if you are running the touch command and specify a file that doesn’t already exist. The touch command in Linux is used to alter the access and modification times for a given file or set of files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |