Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow-up on the core utilities implementations. #15

Open
31 of 75 tasks
mdaadoun opened this issue Mar 18, 2022 · 9 comments
Open
31 of 75 tasks

Follow-up on the core utilities implementations. #15

mdaadoun opened this issue Mar 18, 2022 · 9 comments
Labels
enhancement New features / General improvements help wanted Extra attention is needed

Comments

@mdaadoun
Copy link
Contributor

mdaadoun commented Mar 18, 2022

The core utilities list

From POSIX standards and the GNU core utilities here is a list of the commands. This issue can be used to discuss progress, priorities, consistencies and general problems related to those commands in an embedded linux environment like the pico.

  • grep :: search a file for a pattern
  • cat :: concatenate and print files
  • printf :: write formatted output
  • tr :: translate characters
  • xargs :: construct argument lists and invoke utility
  • sort :: sort, merge, or sequence check text files
  • test :: evaluate expression
  • cd :: change the working directory
  • ls :: list directory contents
  • mkdir :: make directories
  • rmdir :: remove directories
  • cp :: copy files
  • mv :: move files
  • rm :: remove directory entries
  • diff :: compare two files
  • echo :: write arguments to standard output
  • jobs :: display status of jobs in the current session
  • chmod :: change the file modes
  • chgrp :: change the file group ownership
  • chown :: change the file ownership
  • alias :: define or display aliases
  • unalias :: remove alias definitions
  • sed :: stream editor
  • awk :: pattern scanning and processing language
  • cut :: cut out selected fields of each line of a file
  • head :: copy the first part of files
  • tail :: copy the last part of a file
  • more :: display files on a page-by-page basis
  • less :: terminal pager (like more)
  • pwd :: return working directory name
  • df :: report free disk space
  • free :: display amount of free and used memory
  • du :: estimate file space usage
  • find :: find files
  • dirname :: return the directory portion of a pathname
  • basename :: return non-directory portion of a pathname
  • tee :: duplicate standard input
  • uniq :: report or filter out repeated lines in a file
  • bc :: arbitrary-precision arithmetic language
  • cksum :: write file checksums and sizes
  • expr :: evaluate arguments as an expression
  • read :: read a line from standard input
  • sleep :: suspend execution for an interval
  • time :: time a simple command
  • true :: return true value
  • false :: return false value
  • wc :: word, line, and byte or character count
  • csplit :: split files based on context
  • dd :: convert and copy a file
  • patch :: apply changes to files
  • expand :: convert tabs to spaces
  • file :: determine file type
  • iconv :: codeset conversion
  • ln :: link files
  • mkfifo :: make FIFO special files
  • nl :: line numbering filter
  • od :: dump files in various formats
  • pax :: portable archive interchange
  • touch :: change file access and modification times
  • date :: write the date and time
  • id :: return user identity
  • uname :: return system name
  • type :: write a description of command type
  • who :: display who is on the system
  • su :: run a command with substitute user and group ID
  • sudo :: execute a command as another user
  • locate :: find the files by name
  • ping :: send request to network hosts
  • wget :: network downloader
  • curl :: transfer a URL
  • man :: interface to the system reference manuals
  • mount && unmount :: mount/unmount a filesystem
  • lsblk :: list block devices
  • dmesg :: print or control the kernel ring buffer
  • vim :: screen-oriented (visual) display editor

More commands, see the implementation of core utils in rust : https://github.com/uutils/coreutils

@bill88t
Copy link
Member

bill88t commented Mar 18, 2022

Yea, I hadn't quite realised how many they really are..

@bill88t bill88t added enhancement New features / General improvements help wanted Extra attention is needed labels Mar 18, 2022
@bill88t bill88t pinned this issue Mar 18, 2022
@mdaadoun
Copy link
Contributor Author

I will start more and less pagers

@bill88t
Copy link
Member

bill88t commented Mar 19, 2022

The api is there to make these external commands. See cat.

@marios-pz
Copy link
Contributor

marios-pz commented Mar 26, 2022

deprecate [compress, uncompress, zip, unzip ] because they can be fulfilled in one go just by making tar and its far more superior 😎
(also untar? 👀 )
if its really requested they can return back as ljinux packages rather than bloating the source.

sh is not existent for us since we build based and not bash.
I don't have time to analyze all tools but hopefully -6 tools should save time.

@bill88t
Copy link
Member

bill88t commented Mar 26, 2022

All of these tools can be implemented as based scripts with the inclusion of pexec and fpexec. There is not source bloating.
However, we are still limited to the 1mb of storage the pico offers. Until my custom installer is done, we have to keep it below that.
(Souce folder is excluded from size calculations.)

@bill88t
Copy link
Member

bill88t commented Apr 20, 2022

Instead of providing an installer i'm instead relying on the makefile to do all the heavy lifting. All extra apps (games and stuff we will eventually make) will be included as makefile targets. So there is no reason whatsoever to worry about having too many apps.

@bill88t
Copy link
Member

bill88t commented Jul 6, 2022

Less has been added.
tar / untar, zip / unzip, compress / uncompress are not doable, added jz instead.

@bill88t
Copy link
Member

bill88t commented Jul 6, 2022

alias & all the sums are now in

@bill88t
Copy link
Member

bill88t commented Apr 13, 2024

mv has been added.
cp and rm were also reworked to be a lot more stable (and destructive).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features / General improvements help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants