Linux Commands - saranbhabu048/Cyber-Security-Placement-Training- GitHub Wiki

DAY - 03

head (filename).txt : The head command, as the name implies, print the top N number of data of the given input. By default, it prints the first 10 lines of the specified files. If more than one file name is provided then data from each file is preceded by its file name.

head -n (filename.txt : Prints the n number of time specified by the user. image nl (filename).txt : The nl command reads the File parameter (standard input by default), numbers the lines in the input, and writes the numbered lines to standard output. In the output, the nl command numbers the lines on the left according to the flags you specify on the command line. image Process Management ps : The ps command in Linux is a powerful tool that allows you to view information about the processes running on your Linux system. It stands for “process status” and it’s a command that you can use from the command line to get information about the currently running processes.

ps aux : The ps aux Linux command is a commonly used command in Linux for obtaining information about running processes. It can provide a comprehensive list of processes in a user-friendly format, including their process IDs (PIDs), CPU and memory usage, execution states, and other vital details. image ps aux|grep apache : This command can filter the processes based on any pattern or keyword that you provide to the command. Command : find /etc -type f -name apache2 image