Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linux dir command- dirx

This project is a modified implementation of linux dir command in C.

Installation:

 # Clone this repository to a folder and navigate there
 make
 chmod -rwx ./dirx
 sudo mv ./dirx /bin/

Running the command:

# Show contents of the pwd
dirx

# Sorted file display
dirx -s name
dirx -s size
dirx -s date

# Reverse sorted
dirx -s name -r
dirx -s size -r
dirx -s date -r

# Recursive display: Shows the contents of the subfolder
dirx -R <further options>

# Display the contents as a tree (Recursive by default)
dirx -t <Sorting options>

# Display only particular filetypes (txt, c, pdf)
dirx <Options> -f __filetype__

This command uses the dirent.h file to get the directories and filenames. The names are stored in a tree structure implemented using linked lists with a next and a branch pointer.
The files in any subfolder are stored in a branch from the main parent folder tree.

About

dirx is an implementation of the linux dir command

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages