Search Results

Search: Posts Made By: dcaccount
12,244
Posted By Aia
I wouldn't do just one ping (-c1). It is quite...
I wouldn't do just one ping (-c1). It is quite normal for the first ping to fail if there's not ARP table entry, and it would not be an indication that the node has lost network connectivity.

-c 3...
12,244
Posted By RudiC
ping -c1 unix.com &>/dev/null && echo "online" ||...
ping -c1 unix.com &>/dev/null && echo "online" || echo "offline"
online
1,775
Posted By vgersh99
..... {exit}' | sh
.....
{exit}' | sh
1,775
Posted By MadeInGermany
The closing ' is missing, at the end of the...
The closing ' is missing, at the end of the embedded awk script.
I wonder if you can simply do
find . -type f -mmin +$MM -printf "%T@ %s %h/%f\\n" |
sort -n |
awk -vMXSZ=$GG '(TOTSZ+=$2) >=...
1,775
Posted By RudiC
Do I read that correctly that the oldest files'...
Do I read that correctly that the oldest files' sizes should sum up to $GG, and, when below, be deleted? Try (shamelessky stolen from Chubler_XL):

find . -type f -mmin +$MM -printf "%T@ %s...
1,775
Posted By Chubler_XL
You could try this: MM=120 GG=5000 XX=20...
You could try this:

MM=120
GG=5000
XX=20

# get size of directory
szm=$(du -s --block-size M ./192.168.1.xxx | awk '{print int($0)}')
data=$(date --rfc-3339=seconds)

if [ $szm -ge $GG ]...
999
Posted By Corona688
I don't see anything obviously wrong You have...
I don't see anything obviously wrong You have edited this in Microsoft Word which has inserted a few nasty "smart quotes" into it. Replace all smart quotes with ' and " in an actual text editor.
...
999
Posted By MadeInGermany
-delete is faster than -exec rm. After deleting...
-delete is faster than -exec rm.
After deleting the files run another find that deletes the empty directories
find /path/to/Backup_NVR -type f -mmin +60 -delete
find /path/to/Backup_NVR -mindepth...
999
Posted By jim mcnamara
The command for directory usage - du - du -s...
The command for directory usage - du -
du -s --block-size G /fullpath/to/Backup_NVR
Gives the size in GB.

# get size of directory
sz=$(du -s --block-size G /fullpath/to/Backup_NVR | awk...
Showing results 1 to 9 of 9

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