Linux Bash alias

Exampel of bash aliases 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 alias PS='ps -ef|grep smon' alias SQ='sqlplus / as sysdba' alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' alias grep='grep --color=auto' alias l='ls -altr' alias l.='ls -d .* --color=auto' alias ll='ls -l --color=auto' alias ls='ls --color=auto' alias scripts='cd /u01/app/oracle/scripts' alias xzegrep='xzegrep --color=auto' alias xzfgrep='xzfgrep --color=auto' alias xzgrep='xzgrep --color=auto' alias zegrep='zegrep --color=auto' alias zfgrep='zfgrep --color=auto' alias zgrep='zgrep --color=auto'

July 29, 2026 · Tommy Rönnholm

Linux Bash Script

The bash scripts below is usefull as template starter script. Total time script Script to calculate total execution time. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 #!/usr/bin/ksh # Assign value for start and end time start_time=$(date +'%Y-%m-%d %H:%M:%S') #--- Simulating a task taking 15 sec --- sleep 15 end_time=$(date +'%Y-%m-%d %H:%M:%S') start_timestamp=$(date -d "$start_time" '+%s') end_timestamp=$(date -d "$end_time" '+%s') # Calculate the time difference in seconds time_diff=$((end_timestamp - start_timestamp)) # Display time in readable format hours:minutes:seconds total_time=$(date -u -d@"$time_diff" +'%H:%M:%S') echo "Total time : $total_time" Oracle Data pump export script Show start, stop and total time. ...

July 28, 2026 · Tommy Rönnholm