[alexsystem ~]# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/hda2 121896960 227651 121669309 1% /
/dev/hda1 26104 44 26060 1% /boot
tmpfs 64417 1 64416 1% /dev/shm
find . -mindepth 2 | awk -F/ '{ print $2"/" }' | sort | uniq -c | sort -n | tail -10
Linux has been one of the most popular operating system that powers various NAS (Network Attached Storage), routers, gateways, IoT (Internet of Things), computers and etc. Some users may also dual-boot Windows and Linux. If a volume or partition of a storage media is formatted as a Linux filesystem, such as ext2 (second extended filesystem), ext3 (third extended filesystem) or ext4 (fourth extended filesystem), then you may have problem accessing and reading the Linux partitions in Windows system.
Even though Linux has built-in support for Windows FAT32 and NTFS partitions, but Windows does not have built-in capability to access, read and/or write to Linux partitions without third-party software. Thus whenever you plug in or connect a disk drive formatted as Linux partition to Windows, it won’t recognize it, instead asking you to delete and recreate the volume or format the volume.
In order to access and connect to Linux volumes in Windows operating system, try one of the following applications, which add support to Windows so that it can access, open, read, and possibly write to partitions configured with Linux filesystem.
Ext2Fsd
Ext2Fsd (short for Ext2 File System Driver) is a free open source file system driver for Windows that adds support for ext3, ext3 and ext4 file systems. With Ext2Fsd, users can have native read and write access to the ext2, ext3 and ext4 file systems through an automatically assigned drive letter that any program can access, just like any NTFS or FAT32 volumes. The advantage is that you can access the files and folders on the Linux volumes without having to copy them to Windows volume prior to accessing them.
Ext2Fsd
Features of Ext2Fsd:
ext2/ext3 volume reading & writing
ext3 journal replay when mounting
various codepage: utf8, cp936, cp950…
mountpoint automatic assignment
large inode size: 128, 256…
large file size bigger than 4G
CIFS sharing over network
htree directory indexing
ext4 extent read-only, no size truncating and expanding support
Fast fsck (uninit_bg) and group block checksum support
64k block-size, support compatible to Linux ext4 and e2fsprogs
auto start during Windows boot
Ext2Fsd supports Windows 2000, Windows XP, Windows Vista, Windows Server 2003, Windows Server 2008, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows Server 2012, Windows Server 2016 or later.
Download Ext2Fsd from sourceforge.net.
...
https://linux.die.net/man/1/ftpmail
ftpmail(1) - Linux man page
Name
ftpmail - FIFO-based Perl script for sending email based on proftpd TransferLog
Synopsis
ftpmail [ --help ] [ --fifo fifo-path ] [ --from email-address ] [ --log xferlog-file ] [ --recipient email-address ] [ --subject email-subject ] [ --smtp-server server-address ] [ --attach-file ] [ --auth smtp-auth-info-file ] [ --ignore-users regex-pattern ] [ --watch-users regex-pattern ]
Description
ftpmail is a Perl script designed to read ProFTPD's TransferLog log entries, watching for uploads, and to send an automatic email notification when uploads occur. To use ftpmail , you configure your proftpd daemon to write its TransferLog to a FIFO; the ftpmail program is a FIFO reading program which then processes those log messages.
https://github.com/proftpd/proftpd/blob/master/contrib/ftpmail
#!/usr/bin/env perl
# ---------------------------------------------------------------------------
# Copyright (C) 2008-2017 TJ Saunders <tj@castaglia.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
# ---------------------------------------------------------------------------
use strict;
use File::Basename qw(basename);
use Getopt::Long;
use Mail::Sendmail;
use MIME::Base64 qw(encode_base64);
use Time::HiRes qw(usleep);
my $program = basename($0);
my $opts = {};
GetOptions($opts, 'attach-file', 'fifo=s', 'from=s', 'help', 'ignore-users=s',
'log=s', 'recipient=s@', 'upload-recipient=s@', 'download-recipient=s@',
'sleep=s', 'smtp-server=s', 'subject=s', 'watch-users=s', 'auth=s');
...
Пример #1 Содержимое sample.ini
; Это пример файла настроек
; Комментарии начинаются с ';', как в php.ini
[first_section]
one = 1
five = 5
animal = BIRD
[second_section]
path = "/usr/local/bin"
URL = "http://www.example.com/~username"
[third_section]
phpversion[] = "5.0"
phpversion[] = "5.1"
phpversion[] = "5.2"
phpversion[] = "5.3"
urls[svn] = "http://svn.php.net"
urls[git] = "http://git.php.net"
Пример #2 Пример использования функции parse_ini_file()
Константы также могут обрабатываться в ini-файлах, так что если вы объявите константу в виде значения для ini-файла до вызова parse_ini_file(), то константа будет корректно обработана. Таким образом обрабатываются только значения опций. Например:
// startuid.c
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/wait.h>
int main(void)
{
pid_t child_pid;
printf("Real UID\t= %d\n", getuid());
printf("Effective UID\t= %d\n", geteuid());
printf("Real GID\t= %d\n", getgid());
printf("Effective GID\t= %d\n", getegid());
if((child_pid = fork()) < 0 )
{
perror("fork failure");
exit(1);
}
if(child_pid == 0)
{
execl("/bin/ls", "ls", "-l", "/root", (char*)0);
perror("execl() failure!\n\n");
_exit(1);
}
return EXIT_SUCCESS;
}
[Unix]# ls -l
-rwxr-xr-x 1 root root 7348 Jul 2 18:19 startuid
[Unix]# chmod u+s startuid
[Unix]# ls -l
-rwsr-xr-x 1 root root 7348 Jul 2 18:19 startuid