summaryrefslogtreecommitdiff
path: root/Userland/ls.cpp
AgeCommit message (Collapse)Author
2019-10-19ls: Fix alignment of device files in long mode (ls -l)Andreas Kling
2019-10-19ls: Add -t and -r flagsAndreas Kling
-t: Sort by modification time (default is to sort by name) -r: Reverse sort order Note that these only apply when used together with -l (long mode.)
2019-09-11ls: Add -h (human readable) output switchAndreas Kling
Fixes #543.
2019-09-06AK: Rename <AK/AKString.h> to <AK/String.h>Andreas Kling
This was a workaround to be able to build on case-insensitive file systems where it might get confused about <string.h> vs <String.h>. Let's just not support building that way, so String.h can have an objectively nicer name. :^)
2019-08-20ls: Sort the output alphabeticallyAndreas Kling
Also use StringBuilder to construct the full relative paths, to get rid of an unnecessary and suspicious-looking buffer.
2019-08-20ls: Don't layout or colorize output if stdout is not a TTYAndreas Kling
2019-08-20Userland: ls division by zero.marprok
When the terminal app window became smaller than the longest filename, a division by zero occured while calculating the offset.
2019-08-19Userland: Improved the printing of the ls command. (#468)Marios Prokopakis
The ls command takes into consideration the length of the largest filename when it prints a line. Fixes #432.
2019-07-21ls: Don't print an empty line if there were no files to show.Andreas Kling
Fixes #352.
2019-06-22Userland: Fix more compiler warnings.Andreas Kling
2019-06-07Userland: Run clang-format on everything.Andreas Kling
2019-06-01ls: Show user name and group name if available. (#151)Mustafa
Fixes #150
2019-05-27LibCore: Add CDirIterator, and use it in everything rather than readdirRobin Burchell
2019-05-27ls: Fix build and tidy up coding style.Andreas Kling
2019-05-27Ls: Cleanupfaissaloo
2019-05-27Ls: Support multiple filesfaissaloo
2019-05-27Ls: Support single files in long modefaissaloo
2019-05-27Ls: Refactor long directory listingsfaissaloo
2019-05-27Ls: Add single file support in short modefaissaloo
2019-04-20Sprinkle use of AK::Vector in various places.Andreas Kling
Some of these are less helpful than others. Avoiding a bunch of mallocs in the event loop wakeup code is definitely nice.
2019-02-27Userland: /bin/ls should show major,minor for block devices.Andreas Kling
2019-02-25More moving towards using signed types.Andreas Kling
I'm still feeling this out, but I am starting to like the general idea.
2019-02-22Userland: Fix two compiler warnings.Andreas Kling
2019-02-21Kernel+Userland: Implement setuid() and setgid() and add /bin/suAndreas Kling
Also show setuid and setgid bits in "ls -l" output. :^)
2019-02-14Userland: /bin/ls should display socket files nicely.Andreas Kling
2019-02-08LibC: Implement enough missing stuff to get bash-5.0 running. :^)Andreas Kling
2019-02-03Kernel: Oops, I mixed up st_dev and st_rdev in struct stat.Andreas Kling
2019-02-03Userland: Pretty-print modification times in /bin/ls.Andreas Kling
2019-01-31Userland: /bin/ls shouldn't display inode numbers by default.Andreas Kling
Added the -i option to ls which turns on inode number display.
2019-01-31Make stat() work on device files again.Andreas Kling
FileDescriptor will now keep a pointer to the original inode even after opening it resolves to a character device. Fixed up /bin/ls to display major and minor device numbers instead of size for device files.
2018-12-19Implement utime() along with a naive /bin/touch.Andreas Kling
This synchronous approach to inodes is silly, obviously. I need to rework it so that the in-memory CoreInode object is the canonical inode, and then we just need a sync() that flushes pending changes to disk.
2018-12-07Fix /bin/ls usage string.Andreas Kling
2018-12-04Import a simple text editor I started working on.Andreas Kling
2018-11-29Add TIOCGWINSZ ioctl so userland can determine terminal geometry.Andreas Kling
(Don't) use this to implement short-form output in ls. I'm too tired to make a nice column formatting algorithm. I just wanted something concise when I type "ls".
2018-11-17Support "ls <path>" rather than just "ls" :^)Andreas Kling
2018-11-09Fix all current build warnings in the userland.Andreas Kling
2018-10-31Fix ls build.Andreas Kling
2018-10-28Add basic symlink support.Andreas Kling
- sys$readlink + readlink() - Add a /proc/PID/exe symlink to the process's executable. - Print symlink contents in ls output. - Some work on plumbing options into VFS::open().
2018-10-28Colorize ls output.Andreas Kling
2018-10-27Add some basic field width support to printf().Andreas Kling
Use it to make "ls" output a bit better. Also sys$spawn now fails with EACCES if the path is not a file that's executable by the current uid/gid.
2018-10-27Implement loading of linked ELF executables.Andreas Kling
This took me a couple hours. :^) The ELF loading code now allocates a single region for the entire file and creates virtual memory mappings for the sections as needed. Very nice!
2018-10-26Implement sys$chdir() and teach sh+ls to cd around and browse different dirs.Andreas Kling
2018-10-24Add an lstat() syscall and use it to make "ls" nicer.Andreas Kling
2018-10-24Lots of hacking to make a very simple "ls" utility.Andreas Kling
I added a dead-simple malloc that only allows allocations < 4096 bytes. It just forwards the request to mmap() every time. I also added simplified versions of opendir() and readdir().
2018-10-24Add simplified mmap() and munmap() syscalls.Andreas Kling