????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 216.73.216.163 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/home/b8009/Python-3.6.3/Tools/scripts/ |
Upload File : |
#! /usr/bin/env python3 # Print the product of age and size of each file, in suitable units. # # Usage: byteyears [ -a | -m | -c ] file ... # # Options -[amc] select atime, mtime (default) or ctime as age. import sys, os, time from stat import * def main(): # Use lstat() to stat files if it exists, else stat() try: statfunc = os.lstat except AttributeError: statfunc = os.stat # Parse options if sys.argv[1] == '-m': itime = ST_MTIME del sys.argv[1] elif sys.argv[1] == '-c': itime = ST_CTIME del sys.argv[1] elif sys.argv[1] == '-a': itime = ST_CTIME del sys.argv[1] else: itime = ST_MTIME secs_per_year = 365.0 * 24.0 * 3600.0 # Scale factor now = time.time() # Current time, for age computations status = 0 # Exit status, set to 1 on errors # Compute max file name length maxlen = 1 for filename in sys.argv[1:]: maxlen = max(maxlen, len(filename)) # Process each argument in turn for filename in sys.argv[1:]: try: st = statfunc(filename) except OSError as msg: sys.stderr.write("can't stat %r: %r\n" % (filename, msg)) status = 1 st = () if st: anytime = st[itime] size = st[ST_SIZE] age = now - anytime byteyears = float(size) * float(age) / secs_per_year print(filename.ljust(maxlen), end=' ') print(repr(int(byteyears)).rjust(8)) sys.exit(status) if __name__ == '__main__': main()