From 75a4a592e5ccda30715f93563d741b83e0dcf39e Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Mon, 25 Apr 2011 13:37:00 +0000 Subject: Slackware 13.37 Mon Apr 25 13:37:00 UTC 2011 Slackware 13.37 x86_64 stable is released! Thanks to everyone who pitched in on this release: the Slackware team, the folks producing upstream code, and linuxquestions.org for providing a great forum for collaboration and testing. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. As always, thanks to the Slackware community for testing, suggestions, and feedback. :-) Have fun! --- slackbook/html/file-commands-creation.html | 143 +++++++++++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 slackbook/html/file-commands-creation.html (limited to 'slackbook/html/file-commands-creation.html') diff --git a/slackbook/html/file-commands-creation.html b/slackbook/html/file-commands-creation.html new file mode 100644 index 000000000..cfbf72050 --- /dev/null +++ b/slackbook/html/file-commands-creation.html @@ -0,0 +1,143 @@ + + + + +Creation: touch and mkdir + + + + + + + + + + + +
+

10.4 +Creation: touch and mkdir

+ +
+

10.4.1 touch

+ +

touch(1) is used to change the timestamp on a file. You can +change access timestamps and modification timestamps with this command. If the file +specified does not exist, touch will create a zero length file +with the name specified. To mark a file with the current system time, you would issue +this command:

+ + + + + +
+
+% ls -al file1
+-rw-r--r--    1 root     root        9779 Feb  7 21:41 file1
+% touch file1
+% ls -al file1
+-rw-r--r--    1 root     root        9779 Feb  8 09:17 file1
+
+
+ +

There are several options for touch, including options to +specify which timestamp to modify, the time to use, and many more. The online manual page +discusses these in detail.

+
+ +
+

10.4.2 mkdir

+ +

mkdir(1) will create a new directory. You simply specify the +directory to create when you run mkdir. This example creates the hejaz directory in the current directory:

+ + + + + +
+
+% mkdir hejaz
+
+
+ +

You can also specify a path, like this:

+ + + + + +
+
+% mkdir /usr/local/hejaz
+
+
+ +

The -p option will tell mkdir to +make any parent directories. The above example will fail if /usr/local does not exist. The -p option +will create /usr/local and /usr/local/hejaz:

+ + + + + +
+
+% mkdir -p /usr/local/hejaz
+
+
+
+
+ + + + + -- cgit v1.2.3