Coder Social home page Coder Social logo

sfehrman / pd Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 127 KB

Print Directory (pd) This program will read the current directory or the directories listed on the command line and display the contents showing the "files" first then the "directories".

Roff 18.89% C 81.11%

pd's Introduction

pd

This program will read the current directory or the directories listed on the command line and display the contents showing the "files" first then the "directories". This program can be used instead of "ls".

Compile

gcc -o pd pd.c -O3 -lncurses

Install

Copy the binary file pd to a folder that is in the command search path:

cp pd /usr/local/bin

Copy the man page to the manual folder:

cp pd.1 /usr/local/share/man/man1

Run

List the current directory:

% pd

/Users/sfehrman/git/pd   7 Entries.

5 Files.

ChangeLog  README     README.md  pd.1       pd.c

2 Directories.

.git       .vscode

List the current directory, show the size and the date/time modified:

% pd -S -ddtm

/Users/sfehrman/git/pd   7 Entries.

5 Files.

Name         Size (bytes)  Modified             
---------------------------------------------------------------------------------------------------
ChangeLog           10601  2022/01/03-18:21:59  
README                720  2022/01/03-15:36:00  
README.md             215  2022/01/03-15:36:00  
pd.1                12716  2022/01/03-18:17:29  
pd.c                54615  2022/01/03-19:05:35  

2 Directories.

Name         Size (bytes)  Modified             
---------------------------------------------------------------------------------------------------
.git                  416  2022/01/03-19:20:31  
.vscode                96  2022/01/03-15:38:26  

List the / directory:

% pd /

/   21 Entries.

3 Files.

.DS_Store           .VolumeIcon.icns    .file

18 Directories.

.fseventsd          .vol                Applications        Library             System
Users               Volumes             bin                 cores               dev
etc                 home                opt                 private             sbin
tmp                 usr                 var

pd's People

Contributors

sfehrman avatar

Watchers

James Cloos avatar  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.