an argument specifying directory name then this command copies each source file to the destination directory with the same name, created if not existed but if already existed then it will be overwritten, so be careful !!.
That’s where thelogrotatecommandin Linux comes into play.logrotatewill periodically take the current log files, rename them, optionally compress them, and generate a fresh file to which an application can continue sending its logs. Thelogrotatecommand is invoked automatically from cron, and most se...
Example 5:- -s The -s parameter comes in very handy as it will users to view the aggregate disk usage of a directory. User has to input the following command to do so: du -sh /home/putty Example 6:- du command with specific sizes ...
50. Awk Command Awk is a software utility that one can leverage to write small programs in the way of statements. Users can utilize these statements to define text patterns which can be searched in a document. One of the primary purposes of Awk is to scan patterns and processes. Awk is ...
The fdisk command is used for disk partitioning in Linux. It allows you to create, delete, resize, and manage partitions on a hard drive Q2: How do I list all partitions on a disk using fdisk? You can list all partitions on a disk using the -l option. For example, to list partition...
If you want to terminate all instances of a specific program, you can use the "pkill" command with the program’s name. For example, to kill all instances of "firefox," use: pkill firefox Conclusion: The Linux "kill" command is an invaluable tool for managing processes and controlling the...
Ping command is used to check whether the host is alive or not. It sends and receives the packets in 1 sec time interval. [user1@linuxhelp ~]$ ping google.comPING google.com (216.58.197.78) 56(84) bytes of data. 64 bytes from maa03s21-in-f14.1e100.net (216.58.197.78): icmp_seq...
For example, to change the password as expired for a user named “james“, use the following command: sudo passwd -e james Next, with the help of thechagecommand, we can verify the user james’ password expiration. Finally, thechagecommand views and changes the user password expiry informati...
That command will give you output like this: You can also specify a source address, like so: ss -a src <IP address> This is useful if your server has more than one IP address, for example. Another example is filtering by state, such as viewing all sockets with an established connection...
Tutorial on using join, a UNIX and Linux command to join lines of two files on a common field. Examples of joining two files, sorting before joining, specifying a field separator and specifying the output format.The UNIX and Linux join command ...