Important Linux Commands for Performance Testers

This article contains important Linux commands to help performance testers and engineers working on Linux systems.

Linux CommandDescriptionImportant Options
sudoSuper User DO: To perform tasks that require administrative or root permissions.

Example: $ sudo
-g -h -k
suSwitch User: To run a command with another user

Example: $ su admin2
-p -s -l
pwdPrint Working Directory: To get the path of the current working directory

Example: $ pwd
-L -P
cdChange Directory: To navigate through the file and directory by providing the path

Example: $ cd /home/user/project/document
..
lsLiSt: To get the list of files and directories available in the current directory

Example: $ ls
-l -t -r -R -a -lh
cpCoPy: To copy the file or directory.

Example: $ cp File.log /home/user/project/document
-R
mvMoVe: To move or rename the file or directory.

Example: $ mv File.log /home/user/project/document // To move
Example: $ mv OldFile.log NewFile.log // To rename
mkdirMaKe DIRectory: To create new directory.

Example: $ mkdir NewDir
-p -m -v
rmdirReMove DIRectory: To delete an empty directory permanently.

Example: $ rmdir ExistingDir
-p
rmReMove: To delete a file permanently.

Example: $ rm ExistingFile
-i -f -r
touchTo create an empty file

Example: $ touch /home/user/project/document/hdlc.doc
findFIND: To search for files within a specific directory

Example: $ find -name ExistingFile.txt //Search in the current folder

Example: $ find /home/user -name ExistingFile.txt //Search in the specific folder
grepGlobal Regular Expression Print: To find a word by searching through all the texts in a specific file.

Example: $ grep ERROR /home/logs.txt //Search ERROR in logs.txt file
dfDisk Filesystem: To check the disk space usage

Example: $ df -h
-h -m -k -T
duDisk Usage: To check the disk usage of specific file or directory

Example: $ du -h logs.txt
-h -m -k -s
headHEADline: To display the first 10 lines of a file.

Example: $ head /home/system/logs.txt
-n -c -q
tailTAILline: To display the last 10 lines of a file

Example: $ tail /home/system/logs.txt
-n
diffDifference: To compare the content of two files

Example: $ diff logs1.txt logs2.txt
-c -u -i
tarTape ARchieve: To compress zip the file or directory

Example: $ tar -cvf logs.tar /home/system/logs
-x -t -u
chmodCHange MODe: To change the read, write and execute permission of a file or directory

Example: $ chmod 777 dummy.exe
-c -f -v
killKILL: To terminate a process using process ID.

Example: $ kill 12345
SIGTERM
SIGKILL
wgetWww Get: To download a file from the internet

Example: $ wget https://www.dummydownload.com/dummySoft.txt
topTOP: To display the list of active processes along with CPU and memory utilization

Example: $ top
historyHISTORY: To display the last 500 commands that are executed.

Example: $ history
-c -d -a
manMANual: To display the user manual or description of any linux command

Example: $ man pwd
echoECHO: To display the text passed in the argument

Example: $ echo “PerfMatrix”
-h -e
zipZIP: To compress the file or directory

Example: $ zip logs.zip /home/system/logs
-r
unzipUNZIP: To extract the file or directory from the zip

Example: $ unzip logs.zip

These are some important and basic Linux commands for Performance Testers, Engineers and QA Testers.

You may be interested:



Leave a Comment