Git Product home page Git Product logo

ft_ls's Introduction

ft_ls

System function ls is recoded on this git repository.

From BSD General Commands Manual:

NAME
	ls -- list directory contents

SYNOPSIS
	ls [-ABCFGHLOPRSTUW@abcdefghiklmnopqrstuwx1] [file ...]

DESCRIPTION
	For each operand that names a file of a type other than directory, ls displays its name as well as any requested,
	associated information.  For each operand that names a file of type directory, ls displays the names of files con-
	tained within that directory, as well as any requested, associated information.

 	If no operands are given, the contents of the current directory are displayed.  If more than one operand is given,
 	non-directory operands are displayed first; directory and non-directory operands are sorted separately and in lexico-
	graphical order.

for more information search in BSD General Commands Manual.

However the synopsis of my ls is:

./ft_ls [-lRartufgds1] [file ...]

To compile a binary that will list directories you should do make. After what you can watch through any directory (if you have such permisions of course). To inititalise ft_ls you should write:

./ft_ls

That's it! Every option (such as -l or -a) is implemented due to the option of original ls, so u can watch how it works and compare with my function!

Images of original ls and ft_ls:

Additional info:

Makefile functions:

  • make/make all - compiles a binary named ft_ls;
  • make clean - removes every object file from obj directory;
  • make fclean - the same as make clean + removes binary file ft_ls;
  • make re - the same as make fclean + make.

ft_ls's People

Contributors

omiroshn avatar

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.