GithubHelp home page GithubHelp logo

ls's Introduction

Compile : run make

Execute : ./a.out [OPTION]... [FILE]...

Options implemented:

  • a do not ignore entries starting with .
  • d list directory entries instead of contents.
  • l use a long listing format
  • R list subdirectories recursively
  • S sort by file size
  • t sort by modification time

Features implemented :

  • Coloring
  • Output formatting
  • Displaying output columnwise
  • Number of columns displayed depends on the terminal size
  • Sticky bits , special files like FIFO , character device , socket , block device.

ls's People

Contributors

arpitbbhayani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ls's Issues

usage error with getopt

ls/main.c

Line 21 in 1ed9da3

* $ ./myls ­lS

hello, I am a postgraduate in china, so I 'am sorry for my poor English expression firstly.

You use getopt api function to parse command line input. As we known, getopt takes an element of argv starting with - as an option, so the usage here should be ./myls -lS instead of ./myls lS. The following usages are the same.

columns issue

ls/print.c

Line 74 in c5563bc

for(i = 0 ; i < n/n_r ; i++ ) {

n_r is the numbers of rows, so n/n_r is the numbers of columns. So there is a problem that we suppose n = 10 n_r = 3, so obviously n/n_r = 3. But the actual number of columns should be 4 instead of 3. I don't understand the meaning of the code here, can explain?

usage error with getopt

ls/main.c

Line 21 in 1ed9da3

* $ ./myls ­lS

hello, I am a postgraduate in china, so I 'am sorry for my poor English expression firstly.

You use getopt api function to parse command line input. As we known, getopt takes an element of argv starting with - as an option, so the usage here should be ./myls -lS instead of ./myls lS. The following usages are the same.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.