Brut, the Brutal Router for Unix Tools by @sstephenson@indieweb.social https://lobste.rs/s/dwbksa #show #unix
https://brut.sh
#unix
208 posts · Last used 1d
Replying to
Advanced Programming in the #UNIX Environment
Week 4: The Unix Filesystem
This week, we'll take a closer look at the Unix Filesystem (UFS). In our first video segment, we visualize how the filesystem structures the disk and organizes files and directories. We illustrate how directory entries are created and moved around.
https://youtu.be/kY4JAXYyByQ
Advanced Programming in the UNIX Environment: Week 04, Segment 1 - The Unix Filesystem
Replying to
Advanced Programming in the #UNIX Environment
Week 4: Links
In this video lecture, we'll take a look at the system calls used to create, remove, and rename both hard- and symbolic links. We'll compare expected output against trivial implementations of the ln(1) and mv(1) commands.
https://youtu.be/0l8o2goJ1kc
Advanced Programming in the UNIX Environment: Week 04 , Segment 2 - Hardlinks and Symlink
Replying to
Advanced Programming in the #UNIX Environment
Week 4: Directories
In this video, we take a look at how directories are created and removed, as well as how to move around the filesystem hierarchy. We also learn how directory permissions are applied, why the 'cd' command must be a shell builtin in order to work, what happens when you remove a directory you're currently in, and we revisit our simple ls(1) clone from week 1, using opendir(2) and readdir(2) to list files.
https://youtu.be/xZ7dNXZ58G8
Advanced Programming in the UNIX Environment: Week 04, Segment 3 - Directories
Replying to
Advanced Programming in the #UNIX Environment
Week 4: Directory Size
Let's dive deep into the structure of the directory on a traditional Unix File System and see how its size is independent of the file sizes of its entries, but dependent on the filename lengths. We'll also use hexdump(1) to cheat a bit and look at the actual directory structure on disk.
https://youtu.be/gY0SE-71LZA
Advanced Programming in the UNIX Environment: Week 04, Segment 4 - Directory Size
Replying to
Advanced Programming in the #UNIX Environment
Week 4: /etc/passwd
In this short video, we try to answer the awkward question "Mommy, where do UIDs come from?". We look at the /etc/passwd user database and identify the various fields before we look at how things can get weird.
https://youtu.be/fv16TWDnLYM
Advanced Programming in the UNIX Environment: Week 04, Segment 5 - /etc/passwd
Replying to
Advanced Programming in the #UNIX Environment
Week 4: getpwuid(2) and /etc/groups
After having discussed all the account fields in /etc/passwd, we now look at the library functions used to look up that information. We learn about how primary and supplementary groups are handled as well as how the hashed passwords are stored outside of the world readable /etc/passwd file.
https://youtu.be/aomkx6_aWpc
Advanced Programming in the UNIX Environment: Week 04, Segment 6 - getpwuid(2) and /etc/groups
Replying to
Advanced Programming in the #UNIX Environment
Week 4: atime, mtime, ctime
In this video lecture, we start looking a little bit closer into what our systems think of "time", something that experts most accurately describe as a big ball of wibbly, wobbly, timey, wimey... stuff. In short, analyze how the atime, mtime, and ctimes of a file connect.
https://youtu.be/ffYEEj5vnlw
Advanced Programming in the UNIX Environment: Week 04, Segment 7 - atime, mtime, ctime
Boosted by @oxy@social.bsdlab.au
Replying to
Advanced Programming in the #UNIX Environment
Week 4: time(3) is an illusion
Having revisited the atime, mtime, and time in our last video segment, we now have to come to terms with time(3) itself. We'll discuss managing the data structures and handling arbitrary concepts such as leap seconds, timezones, and (ugh) Daylight Savings Time. It gets silly real quick.
https://youtu.be/3N2aH1vUacQ
For a lot more time based shenanigans, see also:
https://www.netmeister.org/blog/epoch.html
Advanced Programming in the UNIX Environment: Week 04, Segment 8 - time(3) is an illusion
Unix File and Directory Permissions and Modes (2018) via @bd103@hachyderm.io https://lobste.rs/s/yj7sbv #unix
https://wpollock.com/AUnix1/FilePermissions.htm
Replying to
Advanced Programming in the #UNIX Environment
Week 3: stat(2) intro
In this video lecture, we meet our new best friend, the 'struct stat'. We'll cover the stat(2) system calls and begin discussing each of the fields in the struct, often by example of the ls(1) and stat(1) commands. In this way, we begin learning more about how the Unix File System is implemented.
(Note that the output of stat(1) on #NetBSD is different from that on #Linux.)
https://youtu.be/veFwXrEHPsk
Advanced Programming in the UNIX Environment: Week 03, Segment 1 - All about stat(2)
Replying to
Advanced Programming in the #UNIX Environment
Week 3: UIDs and GIDs
In this video lecture, we'll learn a little bit more about file ownership and the user IDs of a process (real, effective, saved) by looking at the seteuid(2) and setuid(2) system calls and experimenting with setting the setuid bits and observe the file access we gain.
https://youtu.be/YlcF3ncTQpo
Advanced Programming in the UNIX Environment: Week 03, Segment 2 - UIDs and GIDs
Replying to
Advanced Programming in the #UNIX Environment
Week 3: struct stat st_mode
In this video segment, we're looking at how the traditional permissions defined in the struct stat st_mode are applied. You want to pay particular attention to the permissions on directories and the order in which they are checked. One thing that often surprises newcomers is that to delete a file, Unix does not care about the permissions on the file, only on the directory it's in.
Advanced Programming in the UNIX Environment: Week 03, Segment 3 - st_mode and permissions
Replying to
Advanced Programming in the #UNIX Environment
Week 3: chmod(2) and chown(2)
Having seen a lot of examples in our previous videos of creating files, changing their ownership, changing their permissions, we now focus on the system calls that are used to implement the chmod(1) and chown(8) commands.
https://youtu.be/5MJmCanZDyk
Advanced Programming in the UNIX Environment: Week 03, Segment 4 - chmod(2) and chown(2)
Replying to
Advanced Programming in the #UNIX Environment
Week 3: umask(2)
In this video lecture, we'll take a look at what file ownership and permissions are applied when we create a new file. In the process, we'll learn about the concept of a process's "umask", and look at how the 'umask' shell built-in is implemented.
https://youtu.be/bRAR2bv2HSM
Advanced Programming in the UNIX Environment: Week 03, Segment 5 - umask(2)
Replying to
Advanced Programming in the #UNIX Environment
Week 3 (and 4, kind of): Union Mounts and Whiteout Files
One of the file types we've encountered are those of type S_IFWHT, so called "whiteout" files. But what the hell is that?? Let's illustrate! We describe the concept of union mounts and see what happens when a file in the upper layer is removed while the same file still exists in the lower layer: a whiteout file is created to cover up the lower file.
https://youtu.be/MkFExG9jhEE
Advanced Programming in the UNIX Environment: Week 3, Segment 6 - Union Mounts and Whiteout Files
Boosted by @oxy@social.bsdlab.au
Replying to
Advanced Programming in the #UNIX Environment
Week 3: recap
Slides from tonight's class, summarizing the last few videos and adding a few more bits (haha, get it?) about how the umask works.
https://stevens.netmeister.org/631/03-f26.pdf
MotifCentral - All Things Motif/Xt/Xlib https://lobste.rs/s/otexs4 #graphics #unix
https://motif-central.org/
An unexpected difference between terminal programs: backward line wrapping
https://utcc.utoronto.ca/~cks/space/blog/tech/TerminalsLineBackspaceDifferences
#Tech #Unix #SysAdmin
Boosted by @joe@f.duriansoftware.com
MotifCentral: all things Motif/Xt/Xlib
Over the last few days and weeks or so, a few of the people I follow and interact with on Fedi have been talking about centralising information, tools, applications, and expertise from the Motif (and Xt, Xlib, and X11) ecosystem. There's a ton of information, resources, and actively maintained applications out there, but it's all spread out and sometimes difficul
https://www.osnews.com/story/146041/motifcentral-all-things-motif-xt-xlib/
#Unix


