Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cspp-geo-web-viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Hoese
cspp-geo-web-viewer
Commits
7ddbf50b
Verified
Commit
7ddbf50b
authored
Oct 25, 2019
by
David Hoese
Browse files
Options
Downloads
Patches
Plain Diff
Remove error checking for tmpwatch script and add mindepth
parent
348307c9
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tmpwatch/tmpwatch.sh
+3
-2
3 additions, 2 deletions
tmpwatch/tmpwatch.sh
with
3 additions
and
2 deletions
tmpwatch/tmpwatch.sh
+
3
−
2
View file @
7ddbf50b
#!/bin/sh
-e
#!/bin/sh
if
[
$#
-lt
2
]
;
then
if
[
$#
-lt
2
]
;
then
echo
"Usage: ./tmpwatch.sh loop_sleep_seconds mtime dirs ..."
echo
"Usage: ./tmpwatch.sh loop_sleep_seconds mtime dirs ..."
...
@@ -13,7 +13,8 @@ shift 2
...
@@ -13,7 +13,8 @@ shift 2
# Just keep going
# Just keep going
while
true
;
do
while
true
;
do
echo
"
`
date
+
"%Y-%m-%d %H:%M:%S"
`
: Running tmpwatch to remove files older than
$mtime
days..."
echo
"
`
date
+
"%Y-%m-%d %H:%M:%S"
`
: Running tmpwatch to remove files older than
$mtime
days..."
find
"
$@
"
-
"
$TIME_MODE
"
$mtime
-delete
# mindepth 1: don't include the base directories as things to delete
find
"
$@
"
-mindepth
1 -
"
$TIME_MODE
"
$mtime
-delete
echo
"
`
date
+
"%Y-%m-%d %H:%M:%S"
`
: Done"
echo
"
`
date
+
"%Y-%m-%d %H:%M:%S"
`
: Done"
sleep
$sleep_time
sleep
$sleep_time
done
done
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment