Node:Using touch and find, Previous:Using publishing qualifiers, Up:Publishing a Website
The touch
and the find
command line utilities can be used to
select the files that should be transferred to a server. The
touch
command can be used to set a file's modification time to
the current time. The find
command can be used to select the
files that have their modification time set to the current time.
Setting a file's modification time to the current time will cause
WebPublish to transfer the file when WebPublish is publishing an
account.
The touch
command can be used to set a file's modification time
to the current time. If the touch
command is used on a file that
is a part of a website, the file will be more recent than the
copy of the file that is on the server. When WebPublish is
publishing the account, WebPublish will transfer the file. If,
for example, you want to force WebPublish to transfer a website's
index file, you can use the touch
command.
touch index.html
The example above will set the index.html
file's modification
time to the current time. When the website is published by
WebPublish, the index.html
file will be transferred to the
server.
The find
command can be used with the touch
command to touch
multiple website files. This will cause WebPublish to transfer
all of the files that were selected with the find
command. If,
for example, you would like to transfer all of the files with a
jpg
file extension, you can use the find
command with the -exec
option.
find -name "*.jpg" -exec touch {} \;
The example above will use the -exec
option of the find
command
to touch
all of the files in the website that have a jpg
file
extension. This will cause WebPublish to transfer all of the jpg
files when the website is being published by WebPublish.