Visit The New, Modern Unix Linux Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #48
Difficulty: Easy
Alan Turing is considered to be the 'Father of Cryptography'.
True or False?
Linux & Unix Commands - Search Man Pages

touch(1) [plan9 man page]

TOUCH(1)						      General Commands Manual							  TOUCH(1)

touch - set modification date of a file SYNOPSIS
touch [ -c ] file ... DESCRIPTION
Touch attempts to set the modification time of the files to the current time. If a file does not exist, it will be created unless option -c is present. SOURCE
/sys/src/cmd/touch.c SEE ALSO
ls(1), stat(2), chmod(1) BUGS
Touch will not touch directories. TOUCH(1)

Check Out this Related Man Page

touch(1B)					     SunOS/BSD Compatibility Package Commands						 touch(1B)

touch - change file access and modification times SYNOPSIS
/usr/ucb/touch [-acfm] file... DESCRIPTION
touch sets the access and modification times of each file to the current time. file is created if it does not already exist. OPTIONS
-a Change the access time of file. Do not change the modification time unless -m is also specified. -c Do not create file if it does not exist. -f Attempt to force the touch in spite of read and write permissions on file. -m Change the modification time of file. Do not change the access time unless -a is also specified. USAGE
See largefile(5) for the description of the behavior of touch when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes). EXIT STATUS
The following exit values are returned: 0 touch executed successfully and all requested changes were made. >0 An error occurred. touch returns the number of files for which the times could not be successfully modified. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscpu | +-----------------------------+-----------------------------+ SEE ALSO
touch(1), attributes(5), largefile(5) SunOS 5.11 26 Oct 1995 touch(1B)

14 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

TFTP setup

ok, I configured inetd.conf so that the tftp string is not commented out, but I cannot get the process to start. I'm running Solaris 5.8 and need some help. Cabletron said that it's process is 3485, i tried to kill it, it's the wrong process. I started inetd again and still can't kill it. i... (15 Replies)
Discussion started by: veitcha
15 Replies

2. UNIX for Dummies Questions & Answers

file feed one line per argument

What tools can I use to accomplish this? I'm writing a shell script to analyze an inittab file. Here's a sample file: init:3:initdefault: ioin::sysinit:/sbin/ioinitrc >/dev/console 2>&1 tape::sysinit:/sbin/mtinit > /dev/console 2>&1 muxi::sysinit:/sbin/dasetup </dev/console >/dev/console... (10 Replies)
Discussion started by: jpprial
10 Replies

3. IP Networking

tcp/ip network

Hi, Can someone tell me how to set up a basic tcp/ip network on unix, so windows computers can ping it? Thnx, Edwin (10 Replies)
Discussion started by: edw1ns
10 Replies

4. UNIX for Dummies Questions & Answers

scripting help with touch and sed

Hello, I am trying to write a simple script to wake up every 300 seconds and look for a new file in a directory (e.g., "G102005"), remove the "G" from the file name, then print the new filename. Here's what I've got so far. I'm new at this so please forgive the errors or misuse of syntax. It... (14 Replies)
Discussion started by: alexkav
14 Replies

5. Shell Programming and Scripting

How to loop through directories to touch files

Hi, Please help me on this. Suppose i have the following directory structure. /app/data /app/data/eng /app/data/med /app/data/bsc each of the directories data,data/eng,data/med,data/bsc holds files with date extension like a.20081230 b.20081230 and so on I need a script to loop... (9 Replies)
Discussion started by: sussane
9 Replies

6. Shell Programming and Scripting

how to make a log.txt and add date and time when use ls,touch and find

Hey guy, how to make the log.txt file and record date and time when ls, touch and find command run? Thanks Boly (13 Replies)
Discussion started by: chenboly
13 Replies

7. UNIX for Dummies Questions & Answers

touch -t time, using different userid

Hi, I am reciveing files from a remote system on my linux box. These files are named based on time, which I can use to 'touch' the time . I can access/modify these files using my id. but when I tried touching time using my id I am getting error; touch -t 1001261234 1001261234_job2333... (15 Replies)
Discussion started by: rajivbravo
15 Replies

8. Shell Programming and Scripting

SCP and then touch .done file

All, I am looking to make a script and wanted to see if anyone could help out. The script will go through the directory, put a timestamp, transfer it and then create a touch $file.done script HEre is my initial idea, but I don't think it will work properly. Anyone able to help me refine it... (11 Replies)
Discussion started by: markdjones82
11 Replies

9. Shell Programming and Scripting

sh script for file received confirmation

I am new at scripting, (and this fourm- so hi guys!) and I was wondering is there something out there that I can use to do the following: I receive a file on an FTP server I would like a script to look at a specifc directory for a certain file and when it arrives it will send an email... (8 Replies)
Discussion started by: mamemlin
8 Replies

10. UNIX for Dummies Questions & Answers

[Solved] Touch 10% of the total files inside a folder

I'm trying to make this code below to work but I can't find the way to do the following: I want to make the script to touch only 10% of the total amount of files counted inside the given directory instead of all like it is now. I would greatly appreciate it if someone can give me a direction on... (9 Replies)
Discussion started by: regraphix
9 Replies

11. UNIX for Dummies Questions & Answers

Touch Challenge

I've been given a directory full of subdirectories full of logfiles of the same name: /logfiles/day1/file1/blockednodes.csv day1-14 file1-48 The above is the actual directory structure for 14 days worth of a logfile that is generated every 30 minutes. It's been done this way to preserve the... (15 Replies)
Discussion started by: Cludgie
15 Replies

12. Red Hat

Touch - changing date and time

Hi, I am facing a problem with the command - TOUCH on Linux. See the example below: File on Linux: rw-rw-r-- user1 user1 Jan 01 09:00 test.txt The file - test.txt was created by the user - user1. Now, I want to change the date and time, but using other user - user2 The user2... (12 Replies)
Discussion started by: brjohnsmith
12 Replies

13. Shell Programming and Scripting

Change date time stamp of existing file

I have a file hello.txt which was created today (today's date timestamp) I wish to change its date timestamp (access, modified, created) to 1 week old i.e one week from now. uname -a SunOS mymac 5.11 11.2 sun4v sparc sun4v Can you please suggest a easy way to do that ? (12 Replies)
Discussion started by: mohtashims
12 Replies

14. UNIX for Beginners Questions & Answers

Automate "touch" bash script not working.

#!/bin/bash -i SAVEIFS=$IFS IFS=$"\n\b" picc=$* if ; then echo $TDATE if ; then touch dummy touch -t "tdate" dummy touch -r "dummy" "$picc" else echo -e "No mod date value to apply. If there is one in your shell,\ninvoke \eStarted asking advice on this (on (9 Replies)
Discussion started by: iamwrong
9 Replies

Featured Tech Videos