Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-admin-essentials
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etersoft-admin-essentials
Commits
616dcfd8
Commit
616dcfd8
authored
Oct 23, 2014
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix home-clean
parent
3eb63b38
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
home-clean
etersoft-cron/home-clean
+12
-6
No files found.
etersoft-cron/home-clean
100644 → 100755
View file @
616dcfd8
#!/bin/sh
# Remove obsoletes objects and rpm packages
#VERBOSE=1
CHECKUSER
=
"*"
[
-n
"
$1
"
]
&&
CHECKUSER
=
"
$1
"
MAINDIR
=
/home
cd
$MAINDIR
||
exit
1
for
i
in
$(
echo
*)
;
do
#for i in pav ; do
for
i
in
$(
echo
$CHECKUSER
)
;
do
test
-L
"
$MAINDIR
/
$i
/"
&&
continue
test
-d
"
$MAINDIR
/
$i
/"
||
continue
test
-n
"
$VERBOSE
"
&&
echo
Clean
for
user
$i
...
...
@@ -12,7 +14,8 @@ for i in $(echo *) ; do
find
$MAINDIR
/
$i
/
-ctime
+2
-name
".nfs*"
-type
f
-print0
| xargs
-0
rm
-vf
find
$MAINDIR
/
$i
/
-maxdepth
1
-ctime
+20
-name
".xsession-errors*"
-type
f
-print0
| xargs
-0
rm
-vf
find
$MAINDIR
/
$i
/
-maxdepth
1
-ctime
+60
-name
".DCOPserver*"
-type
f
-print0
| xargs
-0
rm
-vf
find
$MAINDIR
/
$i
/
-maxdepth
1
-ctime
+20
-name
".DCOPserver*"
-type
f
-print0
| xargs
-0
rm
-vf
find
$MAINDIR
/
$i
/
-maxdepth
1
-ctime
+20
-name
".DCOPserver*"
-type
l
-print0
| xargs
-0
rm
-vf
find
$MAINDIR
/
$i
/
-maxdepth
1
-ctime
+300
-name
".xauth*"
-type
f
-print0
| xargs
-0
rm
-vf
# TODO: *-buildroot in $i/tmp
...
...
@@ -42,10 +45,13 @@ for i in $(echo *) ; do
for
sd
in
kde ksocket mc orbit
;
do
test
-d
"
$TMPPRIV
/
$sd
-
$i
"
&&
find
"
$TMPPRIV
/
$sd
-
$i
"
-ctime
+20
-print0
| xargs
-0
rm
-vrf
done
find
$TMPPRIV
/plugtmp
*
-ctime
+60
-print0
| xargs
-0
rm
-vrf
find
$TMPPRIV
/pulse-
*
-ctime
+60
-print0
| xargs
-0
rm
-vrf
for
sd
in
plugtmp pulse ssh dconf. .org.chromium.Chromium. akonadi-
;
do
for
ff
in
$TMPPRIV
/
$sd
*
;
do
find
$ff
-ctime
+30
-print0
| xargs
-0
rm
-vrf
done
done
for
n
in
rpm-tmp mutt .nfs
;
do
for
n
in
rpm-tmp mutt .nfs
.xfsm
;
do
find
$TMPPRIV
/
-maxdepth
1
-ctime
+20
-name
"
$n
*"
-type
f
-print0
| xargs
-0
rm
-vf
done
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment