1. Engineering
  2. Computer Science
  3. write a program in c that takes many paths as...

Question: write a program in c that takes many paths as...

Question details

Write a program in c++ that takes many paths as arguments and prints out information about the files and directory (like ls -ld, but not quite)

ls -ld /bin/sh /dev /etc/group /etc/subuid

output:

-r-xr-xr-x 1 root wheel 630464 Jul 14 2017 /bin/sh

dr-xr-xr-x 3 root wheel 4510 Dec 13 16:53 /dev

-rw-r--r-- 1 root wheel 2600 Feb 20 2017 /etc/group

What I need it to look like when running program1 with argument "

/bin/sh /dev /etc/group /etc/subuid"
lrwxrwxrwx 4 2018-12-20T18:31:32 /bin/sh
    drwxr-xr-x 4180 2019-01-02T10:11:05 /dev
    -rw-r--r-- 1713 2018-11-21T11:34:36 /etc/group

time format should be using ISO 8601

Should use lstat and strftime

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution