Follow-up on the core utilities implementations.
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
- [x] cat :: concatenate and print files
- [ ] printf :: write formatted output
- [ ] tr :: translate characters
- [x] xargs :: construct argument lists and invoke utility
- [ ] sort :: sort, merge, or sequence check text files
- [ ] test :: evaluate expression
- [x] cd :: change the working directory
- [x] ls :: list directory contents
- [x] mkdir :: make directories
- [x] rmdir :: remove directories
- [x] cp :: copy files
- [x] mv :: move files
- [x] rm :: remove directory entries
- [ ] diff :: compare two files
- [x] 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
- [x] alias :: define or display aliases
- [x] unalias :: remove alias definitions
- [ ] sed :: stream editor
- [ ] awk :: pattern scanning and processing language
- [ ] cut :: cut out selected fields of each line of a file
- [x] head :: copy the first part of files
- [x] tail :: copy the last part of a file
- [x] more :: display files on a page-by-page basis
- [x] less :: terminal pager (like more)
- [x] pwd :: return working directory name
- [x] df :: report free disk space
- [x] 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
- [x] sleep :: suspend execution for an interval
- [ ] time :: time a simple command
- [x] true :: return true value
- [x] 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
- [x] pax :: portable archive interchange
- [x] touch :: change file access and modification times
- [x] date :: write the date and time
- [ ] id :: return user identity
- [x] uname :: return system name
- [ ] type :: write a description of command type
- [x] 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
- [x] ping :: send request to network hosts
- [x] wget :: network downloader
- [ ] curl :: transfer a URL
- [x] man :: interface to the system reference manuals
- [ ] mount && unmount :: mount/unmount a filesystem
- [ ] lsblk :: list block devices
- [x] 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
Yea, I hadn't quite realised how many they really are..
I will start more and less pagers
The api is there to make these external commands. See cat.
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.
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.)
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.
Less has been added. tar / untar, zip / unzip, compress / uncompress are not doable, added jz instead.
alias & all the sums are now in
mv has been added.
cp and rm were also reworked to be a lot more stable (and destructive).