From a50f59acf58f9dd6e83d9690ef42de1067faaa42 Mon Sep 17 00:00:00 2001 From: 8nlight <8nlight@disroot.org> Date: Sat, 21 Oct 2023 16:03:14 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B8=D1=82=D1=8C=20co?= =?UTF-8?q?reutils/du.c.save?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- coreutils/du.c.save | 56 --------------------------------------------- 1 file changed, 56 deletions(-) delete mode 100644 coreutils/du.c.save diff --git a/coreutils/du.c.save b/coreutils/du.c.save deleted file mode 100644 index af68203..0000000 --- a/coreutils/du.c.save +++ /dev/null @@ -1,56 +0,0 @@ -#include -#include -#include -#include -#include - -unsigned int h_flag; -unsigned int s_flag; -unsigned int b_flag; -unsigned int m_flag; -unsigned int L_flag; - -int du(const char *path) { - struct stat sb; - if (lstat(path, &sb)) { - fprintf(stderr, "du: lstat() %s\n", strerror(errno)); - return 0; - } - - - return 0; -} - -int main(const int argc, const char **argv) { - - int i; - for (i = 1; i < argc; i++) { - if (argv[i][0] != '-') - break; - - else if (!strcmp(argv[i], "-h")) - h_flag = 1; - - else if (!strcmp(argv[i], "-s")) - s_flag = 1; - - else if (!strcmp(argv[i], "-b")) - b_flag = 1; - - else if (!strcmp(argv[i], "-m")) - m_flag = 1; - - else if (!strcmp(argv[i], "-L")) - L_flag = 1; - - else if (!strcmp(argv[i], "--help")) { - printf("du [-h (Sizes in human readable format (e.g., 1K 243M 2G))] [-s (Display only a total for each argument)] [-b (Apparent size)] [-L (Follow all symlinks)] [-m (Size in megabyte)] [file file2...]\n"); - return 0; - } - } - - for (; i < argc; i++) - du(argv[i]); - - return 0; -}