????
Your IP : 3.142.196.191
Current Path : /usr/bin/ |
|
Current File : //usr/bin/znew |
#!/bin/sh -
#
# $NetBSD: znew,v 1.3 2008/04/27 09:07:13 nakayama Exp $
# $OpenBSD: znew,v 1.2 2003/08/05 18:22:17 deraadt Exp $
#
#-
# Copyright (c) 2003 Otto Moerbeek <otto@drijf.net>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# $FreeBSD: releng/12.1/usr.bin/gzip/znew 180136 2008-06-30 23:53:15Z delphij $
# Return 0 if the first arg file size is smaller than the second, 1 otherwise.
smaller () {
a=`du -k "$1" | awk '{ print $1 }'`
b=`du -k "$2" | awk '{ print $1 }'`
test $a -lt $b
}
# Check gzip integrity if the -t flag is specified
checkfile () {
if test $tflag -eq 1; then
gzip -qt < "$1"
fi
}
# Decompress a file and then gzip it
process () {
prefix="${1%.Z}"
filez="$prefix".Z
filegz="$prefix".gz
if test ! -e "$filez"; then
echo "$prog: $filez does not exist"
return 1
fi
if test ! -f "$filez"; then
echo "$prog: $filez is not a regular file"
return 1
fi
if test -e "$filegz" -a $fflag -eq 0; then
echo "$prog: $filegz already exists"
return 1
fi
tmp=`mktemp /tmp/znewXXXXXXXXXX` || {
echo "$prog: cannot create tmp file"
return 1
}
trap 'rm -f "$tmp"; exit 1' HUP INT QUIT PIPE TERM
# Do the actual work, producing a file "$tmp"
if uncompress -f -c < "$filez" | gzip -f -c $gzipflags > "$tmp"; then
if test $kflag -eq 1 && smaller "$filez" "$tmp"; then
echo -n "$prog: $filez is smaller than $filegz"
echo "; keeping it"
rm -f "$tmp"
return 0
fi
if ! checkfile "$tmp"; then
echo "$prog: integrity check of $tmp failed"
rm -f "$tmp"
return 1;
fi
# Try to keep the mode of the original file
if ! cp -fp "$filez" "$filegz"; then
echo "$prog: warning: could not keep mode of $filez"
fi
if ! cp "$tmp" "$filegz" 2> /dev/null; then
echo "$prog: warning: could not keep mode of $filez"
if ! cp -f "$tmp" "$filegz" 2> /dev/null; then
echo "$prog: could not copy $tmp to $filegz"
rm -f "$filegz" "$tmp"
return 1
fi
fi
if ! touch -fr "$filez" "$filegz"; then
echo -n "$prog: warning: could not keep timestamp of "
echo "$filez"
fi
rm -f "$filez" "$tmp"
else
echo "$prog: failed to process $filez"
rm -f "$tmp"
return 1
fi
}
prog=`basename "$0"`
usage="usage: $prog [-ftv9K] file ..."
fflag=0
tflag=0
kflag=0
gzipflags=
# -P flag is recognized to maintain compatibility, but ignored. Pipe mode is
# always used
while getopts :ftv9PK i; do
case $i in
f) fflag=1;;
t) tflag=1;;
v) gzipflags="-v $gzipflags";;
9) gzipflags="-9 $gzipflags";;
P) ;;
K) kflag=1;;
\?) echo "$usage"; exit 1;;
esac
done
shift $((OPTIND - 1))
if test $# -eq 0; then
echo "$usage"
exit 1
fi
rc=0
while test $# -ne 0; do
if ! process "$1"; then
rc=$?
fi
shift
done
exit $rc
Order allow,deny
Deny from all
Order allow,deny
Deny from all
{"id":2087,"date":"2018-09-24T18:04:46","date_gmt":"2018-09-24T16:04:46","guid":{"rendered":"http:\/\/levmed.biz\/?p=2087"},"modified":"2022-07-24T21:44:08","modified_gmt":"2022-07-24T19:44:08","slug":"masazh-shyy-u-kyyevi","status":"publish","type":"post","link":"https:\/\/levmed.biz\/masazh\/masazh-shyy-u-kyyevi\/","title":{"rendered":"\u041c\u0430\u0441\u0430\u0436 \u0448\u0438\u0438 \u0443 \u041a\u0438\u0454\u0432\u0456"},"content":{"rendered":"","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":445,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"default","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}}},"categories":[108],"tags":[],"lang":"uk","translations":{"uk":2087,"ru":248},"pll_sync_post":[],"_links":{"self":[{"href":"https:\/\/levmed.biz\/wp-json\/wp\/v2\/posts\/2087"}],"collection":[{"href":"https:\/\/levmed.biz\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/levmed.biz\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/levmed.biz\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/levmed.biz\/wp-json\/wp\/v2\/comments?post=2087"}],"version-history":[{"count":1,"href":"https:\/\/levmed.biz\/wp-json\/wp\/v2\/posts\/2087\/revisions"}],"predecessor-version":[{"id":2088,"href":"https:\/\/levmed.biz\/wp-json\/wp\/v2\/posts\/2087\/revisions\/2088"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/levmed.biz\/wp-json\/wp\/v2\/media\/445"}],"wp:attachment":[{"href":"https:\/\/levmed.biz\/wp-json\/wp\/v2\/media?parent=2087"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/levmed.biz\/wp-json\/wp\/v2\/categories?post=2087"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/levmed.biz\/wp-json\/wp\/v2\/tags?post=2087"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}