NAME cd – Change the shell working directory. SYNOPSIS cd [-L|-P] [dir] DESCRIPTION Change the shell working directory. Change the current directory to DIR. The default DIR is the value of the HOME shell variable. The variable CDPATH defines the search path for the directory containing DIR. Alternative directory names in CDPATH are separated by […]
Category: Linux
touch command is used to create a empty file. Syntax: $ touch <file name> To create multiple empty file we can use below command. To create 1 to 100 files $ touch testfile{1..100}.txt To create a to z files $ touch testfile{a..z}.txt To create a 100 to 1 file with decrements of 2 $ touch […]
Usage of Pipe (|) commad in Linux
Pipe command redirects the output of one command to input to another command. That means helpful when we want output of one command to input put to the another command. Pipe command represent symbol as |. For Example, a file contains list of 1 to 1000 numbers, lets use cat command to display name. But […]
We can do tunneling the IP and Port through SSH connection using putty software very easily. To do tunnel below points are mandatory: You should have access to server which you want to tunnel. From the your access machine , you should have access to destination IP and port. Port forward should be enabled in […]
How to change the hostname in Linux
This article describes the how the change the hostname in Linux machine. Let’s start. Open the network file. # sudo vi /etc/sysconfig/network Modify the HOSTNAME= value with your domain name. Example hostname is “myhostname” HOSTNAME = myhostname To access with in the server add it in /etc/hosts file 127.0.0.1 myhostname Run the “hostname” command. This command […]
Linux – grep command hacks

grep command print lines matching a pattern. grep is a powerful command for file searching text. here the real-time use full command hacks. The example is the sample file and data. # cat > testfile one two three four five six seven eight nine ten Search string in a file Syntax: grep ‘string’ filename Example: […]
Linux – 10 Useful Networking Commands
Linux is powerful operating system and open source. It provides many inbuilt networking commands for troubleshooting. Here 10 useful networking commands. 1. ifconfig – configure a network interface We can configure network interface related parameters using the ifconfig command, in general, we use ifconfig command to check the IP address. root@kali:~# ifconfig 2. dig: DNS lookup utility dig […]
Linux Directory Commands
Directory Commands ls– This command ‘lists’ the contents of your present working directory. pwd- Shows you what your present working directory is. cd– Lets you change directories. rm– Removes one or more files. rmdir– Remove an empty directory. mkdir– Make a directory. ps– Provides a list of currently running processes. cp– Copy a file. mv– Move a file (this is also used to rename a file, “moving” it […]
SSH File Transfer Protocol (also Secure File Transfer Protocol, or SFTP) is a network protocol that provides file access, file transfer, and file management over any reliable data stream SFTP server default port is 22. sftp command syntax : (man sftp) sftp [-1Cv] [-B buffer_size] [-b batchfile] [-F ssh_config] [-o ssh_option] [-P sftp_server_path] [-R num_requests] [-S program] [-s […]