Converting Epoc time in milliseconds to readable date/time

It is typical in UNIX to deal with time in seconds from EPOC or milli-seconds from EPOC.

The following show commands to show the current date/time to seconds from EPOC

# Date in seconds
date +%s; date; date -d @$(date +%s) 
1769793438
Fri Jan 30 12:17:18 PM EST 2026
Fri Jan 30 12:17:18 PM EST 2026

# From a specific date
date -d "Oct 22, 2024" +%s
1729569600
date -d @1729569600
Tue Oct 22 12:00:00 AM EDT 2024

Display the UNIX uid for currently running commands

There are a number of reasons you might want to know the UNIX uid (user id) for a resource such as a file or a process.

Below are the two commands useful for seeing the UID When running docker containers, it’s sometimes necessary to see the userid of processes running.

# Show me the processes with the uid as well as the username.
ps -eo pid,uid,user,cmd

For files you use the -n option to see the user and group ID (aka uid and gid) for a file or directory.

ls -lnd $HOME

<
Previous Post
Notes on using jq (JSON Query Language)
>
Blog Archive
Archive of all previous blog posts