Dear expert,
what is this command touch -c filename using for?
I find if execute and filename is existed, it update the date to now.
If the filename is not exeisted, it don't create the file..
so what is this command using for?
Thank a lot! (1 Reply)
Hi all,
Can any one tell me how to empty the contents of a file in unix without using the following sequence : rm <file> ; touch <file>
is there any command in unix??
is it possible through shell scripting? If so, how?
-krishna (7 Replies)
I know how to touch like this
touch -t 199908031046 /tmp/file1
But I want to create a cron job for touch a file which 30 min ago in Solaris which haven't -mmin
Can I use like this ? touch -t `date +%s` - 30 /tmp/file1
Because I want to file the file which older than 30min.
Thanks, (6 Replies)
I have a folder with many subdirectories and i need to set the modified date to today for everything in it. Please help, thanks!
I tried something i found online, find . -print0 | xargs -r0 touch
but I got the error: xargs: illegal option -- r (5 Replies)
I am interested in creating a new file from a KSH script where the first line is printed. I know how to create the file, but creating with a pre-defined first line is what I need help with.
My code below creates the file, but how do I accomplish that and do it so that when I open that txt file... (5 Replies)
Hi all,
Need advice from expect, below is my scripts to find the file not use and touch in storage and other directory.
This scripts divide by:
1. 30 days
2. 90 days
3. 180 days
4. 1 years
5. 3 years
6. 5 years
Then count total size in GB from 6 each category.
Sample my... (5 Replies)
Afternoon,
the stat command is used against a file to ascertain date created and last modification time. However a different individual if they so chose could use the touch command to alter the date created or modification time.
Is there anyway to protect against this ?
thanks
Steve (2 Replies)
Hi,
I need to create a trigger file named "start" at 4 pm daily . Once this file is created , another process would be initiated. How do i do it using touch command in unix ?
My script that should have touch command shall be present in a dir /app/user/script while the trigger file should be... (2 Replies)
I have noticed that the following command works
touch subtext_geopdf_to_.x
However this one does not
touch subtext_/geopdf/_to_/.x
How can I create such a file without making it think I supplied a path? (2 Replies)
our requirement is that we need to create a touch file on 2 4 and 7 th working day of the each month ...
If the days falls on saturday/sunday, the touch file should be created on next working day.
We are currently on Red hat 6.5 (1 Reply)
Discussion started by: tradingspecial
1 Replies
LEARN ABOUT CENTOS
service
service(8) System Manager's Manual service(8)NAME
service - run a System V init script
SYNOPSIS
service SCRIPT COMMAND [OPTIONS]
service --status-all
service --help | -h | --version
DESCRIPTION
service runs a System V init script in as predictable environment as possible, removing most environment variables and with current working
directory set to /.
The SCRIPT parameter specifies a System V init script, located in /etc/init.d/SCRIPT. The supported values of COMMAND depend on the
invoked script, service passes COMMAND and OPTIONS it to the init script unmodified. All scripts should support at least the start and
stop commands. As a special case, if COMMAND is --full-restart, the script is run twice, first with the stop command, then with the start
command.
service --status-all runs all init scripts, in alphabetical order, with the status command.
If the init script file does not exist, the script tries to use legacy actions. If there is no suitable legacy action found and COMMAND is
one of actions specified in LSB Core Specification, input is redirected to the systemctl. Otherwise the command fails with return code 2.
FILES
/etc/init.d
The directory containing System V init scripts.
ENVIRONMENT
LANG, TERM
The only environment variables passed to the init scripts.
SEE ALSO chkconfig(8), ntsysv(8), systemd(1), systemctl(8), systemd.service(5)
Jan 2006 service(8)