UNPKG

ilastlog

Version:

alternative lastlog because of Ubuntu 24.04.1. The distros have had the libpam excluding lastlog.so. therefore, I personally needed.

104 lines (58 loc) β€’ 1.86 kB
# iLastlog ## πŸ“ Desc the lastlog command on Ubuntu 24.04.1 don't worked. That's why I created this command. ## πŸ“¦ Requirements - **Node.js**: `>=20.11.1` (version tested: 20.11.1) - **npm**: `>=10.2.4` (version tested: 10.2.4) - **Bash**: `>=5.2.21` (version tested: 5.2.21) - **Not supported Windows OS, Mac** ⚠️ λ‹€λ₯Έ λ²„μ „μ—μ„œλ„ μ •μƒμ μœΌλ‘œ μž‘λ™ν•  수 μžˆμ§€λ§Œ, κ³΅μ‹μ μœΌλ‘œ ν…ŒμŠ€νŠΈλœ 버전은 μœ„μ™€ κ°™μŠ΅λ‹ˆλ‹€. ## ✨ Features . ## πŸ“₯ Installation ### CLI $ npm install --global ilastlog ### API $ cd your_project $ npm install ilastlog ## πŸš€ Usage ilastlog [options] [argText] ### CLI (using Shell) $ # Not supported yet. # ### CLI (using Node) #### help $ ilastlog -h #### basic (using pipe) $ cat /var/log/auth.log | ilastlog #### basic (using arg) $ ilastlog "timeStamp log context" #### other (using alias) ## on bash ## $ echo "alias ilast='cat /var/log/auth.log | ilastlog'" >> ~/.bashrc $ source ~/.bashrc $ ilast #### other (using npx) $ cat /var/log/auth.log | npx ilastlog ### API const { ilastlog } = require("ilastlog"); ilastlog(sampleTexts); ilastlogAsync(sampleTexts).then(callback) ## πŸ§ͺ Sample [sample](https://github.com/ChangRaeJoe/ilastlog/blob/main/test/sample.js) ## Save File Path ### Linux $ cat ~/.local/share/ilastlog-nodejs/lastlog.json ## πŸ”§ Configs . ## Format ### supported time format syslog "MMM dd HH:mm:ss" ISO8601 "yyyy-MM-dd'T'HH:mm:ss.SSSZZ" RFC2822 "EEE, dd MMM yyyy HH:mm:ss ZZ" ## πŸš€ Upcoming Features - Support for customizable time format settings will be added in a future update. ## πŸ“– Docs [Wiki](https://github.com/ChangRaeJoe/ilastlog/wiki) ## πŸ“œ License [MIT](https://github.com/ChangRaeJoe/ilastlog?tab=MIT-1-ov-file)