Home

Date Here

Hello there!
I'm Paul, a developer from California simplifying life with Computer Science

Sub01#0585

Custom Status

Song unavailable
No Artist

Song unavailable

No Artist
0:000:00

Tools

Linux Cheatsheet

A cheatsheet for Linux commands

Base 64 Encoder/Decoder

An encoder and decoder for Base 64 encoding

Projects

psli.space

The website that you are currently viewing right now!

Automated Learning Assistant

The Automated Learning Assistant Project aims to use AI to provide students a step-by-step solution and as well as an explanation of the solution to their problems.

Youtube Downloader Terminal

A YouTube downloader for terminal which can download private playlists, public playlists, and videos.

ASCII Bad Apple Remastered

An experimental project that converts .mp4 to be played in the terminal with ASCII characters.

TI-Calculator

A python 3 to TI-Basic compiler that could compile .py files to .8xp files and run them as well.

ytManager

An all in one YouTube, Spotify, and SoundCloud manager that could stream, download, and manage playlists.

Skills

Music

Past Month

Past 6 Months

All Time

Linux Cheatsheet

Linux Cheat sheet


Basic Commands

  1. Finds all files of a certain pattern in a given directory

bash find -iname "<fileName>"

  1. Finds all files of a certain extension in a given directory

bash find -iname "*.<fileExtension>"

  1. Copy paste a file to another directory

bash cp <file> <destination>

  1. Move a file or rename a file

bash mv <file> <destination>


Group Management

  1. List all groups in the system

bash sudo less /etc/group

  1. Check users of a given group

bash getent group groupname

  1. Add an existing user to a group

bash sudo usermod -a -G <username> <groupname>

  1. Remove user from a group

bash sudo deluser <username> <groupname>


User management

  1. Find user ID of a user

bash id -u <username>

  1. Delete a user

bash userdel [options] <username>

Options Description
-f Forcefully delete a user account and also with forceful removal of files
-r Deletes user account along with mail spool and userโ€™s home directory
-z Deletes SELinux users if they are mapped for the users while deleting user from Linux.
  1. Add user

bash useradd [options] <username>

Options Description
-m Creates user home directory under /home/username
-u [custom userID] Creates user with specified custom user id
-g [loginGroupName] Assigns user to initial login group.
Default login group is the user's username.
-G [otherGroups] Adds user to additional groups.
sudo useradd -G group1,group2 <username>
-c [customComment] Adds a short description for the new user
sudo useradd -c "Comment" <username>
The comment is saved in /etc/passwd
grep <username> /etc/passwd
Output: <username>:x :1001:1001:Comment:/home/username:/bin/sh
-e [YYYY-MM-DD] Adds account expiry date to user
sudo useradd -e 2019-01-22 <username>

Miscellaneous Commands

  1. Finding Extents of a file

bash filefrag -e <filePath>

Example:

root@hawkins-national-labratory:/home/eleven/Desktop# filefrag -e ST_Linux_1_0.tar.gz

Filesystem type is: ef53 File size of ST_Linux_1_0.tar.gz is 18707973 (4568 blocks of 4096 bytes)

ext: logical_offset: physical_offset: length: expected: flags:
0: 0..4095: 2529280 .. 2533375: 4096:
1: 4096..4567: 2523136 .. 2523607: 472: 2533376: last,eof

ST_Linux_1_0.tar.gz: 2 extents found

  1. Finding user expiry date

bash chage -l <username>

Base 64 Encoder/Decoder