Search Results

Search: Posts Made By: JamesCarter
22,520
Posted By JamesCarter
"du -sh $1" gives the size of the directory. My...
"du -sh $1" gives the size of the directory. My idea was to = this size with an argument.

@Krabu

Crontab was the next step.
@Vbe
sry that there were no comments in the scrypt just getting...
22,520
Posted By JamesCarter
Delete files older than "x" if directory size is greater than "y"
I wrote a script to delete files which are older than "x" days, if the size of the directory is greater than "y"


#!/bin/bash

du -hs $1
while read SIZE ENTRY
do

if [ ${SIZE} -gt 200 ];...
21,734
Posted By JamesCarter
Thanks a lot :b: it worked just fine for me :) ...
Thanks a lot :b:
it worked just fine for me :)


...
gzip -r $i
...
21,734
Posted By JamesCarter
Bash: Gzip files in Directory and itīs Subdirectories
Hello dear Community,
I have a task to wrtie a script which will gzip not zipped files in a directory and itīs subdirectories. I succeeded in gzippung the directory but not the subdirectories:

...
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 12:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy