Skip to content

Instantly share code, notes, and snippets.

View rizkaz's full-sized avatar

Saira rizkaz

View GitHub Profile
@rizkaz
rizkaz / user-in-group.sh
Created June 19, 2017 18:38
find users in a group on linux machine
getent group <group-name>
<group-name>:VAS:23434:userid0,userid1,userid2
@rizkaz
rizkaz / git-commands.md
Created March 14, 2017 20:55
git log pretty print

pretty print git log

git log --format='%Cred%h%Creset %s %Cgreen(%cr) %C(blue)<%an>%Creset%C(yellow)%d%Creset' --no-merges

print details

git log --format='%Cred%h%Creset %s %Cgreen(%cr) %C(blue)<%an>%Creset%C(yellow)%d%Creset' --no-merges -p

print details for last two commits

@rizkaz
rizkaz / find.md
Created January 19, 2017 14:42
find command

find all files that end with ".txt" and print details of file information

find . -name "*.txt$" -print0 | xargs -0 ls -lFh

@rizkaz
rizkaz / shell-novice-cheatsheet.md
Last active June 12, 2017 01:35
command cheat sheet

Shell Novice command list

===

Command Usage Description
PS1 PS1='$' set the command prompt to $
whoami whoami display logged in user
pwd pwd print working directory
ls ls list directory contents
@rizkaz
rizkaz / readme.md
Last active December 2, 2016 13:33
markdown examples

The quick brown fox jumped over the lazy dog

bold The quick brown fox jumped over the lazy dog

bold The quick brown fox jumped over the lazy dog

italic The quick brown fox jumped over the lazy dog

italic The quick brown fox jumped over the lazy dog

@rizkaz
rizkaz / removeheaderline.sh
Created May 13, 2016 17:48
remove header from file
sed '1d' file.csv > filenohead.csv
@rizkaz
rizkaz / tsvtocsv
Created May 13, 2016 16:13
tsv to csv
cat file.tsv | tr "\\t" ","  > file.csv
@rizkaz
rizkaz / greplineswithoutblankfirst.sh
Created May 13, 2016 16:11
remove lines with blank first column
grep -v '^\s' file