Skip to content

Little copy of 'ls' Unix command written in C language

Notifications You must be signed in to change notification settings

bartekw2213/ls_program

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 

Repository files navigation

ls_program 📄

Little copy of 'ls' Unix command written in C language.


How to compile it? 🔨

You will need a C compiler, I recommend using GCC Gnu Compiler. You need to compile it with -lbsd flag

gcc main.c -o main.out -lbsd

How to use it? 🔌

./ls.out							# show files in the current directory
./ls.out <path>							# show files in specified directory
./ls.out -a <path>						# show all files including hidden one
./ls.out -l <path>						# show files with long listing format
./ls.out -R <path> 						# show files and list subdirectories recursively
./ls.out -n <path>						# like -l, but list numeric user and group IDs
./ls.out -G <path>						# in a long listing, don't print group names

Can I combine options together? 📎

Yes, all formats shown below will work

./ls.out -alR
./ls.out -a -R -l -nG

About

Little copy of 'ls' Unix command written in C language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages