Copying Files over the Network with scp

To ”’send”’ file or directory ”’to a remote computer”’:
scp -r [/path/filename] [login name@ip address] :

To ”’retrieve”’ file or directory ”’from a remote computer”’  ”’address in your pc”’:
scp -r [login name@ip address] : [/path/filename]  [/path/filename]

Here are the meaning of scp command options:

-r — recursively copy entire directory
. — current directory


To copy all txt files in the current directory to your home directory on the destination machine:
scp *.txt

To copy txt files to a destination directory. You have to have write permission on the target directory:
scp *.txt

To retrieve files from the other machine back to the one you’re on:
scp*.txt /home/support/Desktop

Continue Reading

How To Delete File Contents In Linux

How To Delete File Contents In Linux

I am sure you know that situation when you need to delete file contents in Linux. Just think about it – you have some log files on your Linux workstation or server, and their size just keeps growing and growing… Sometimes, it’s really necessary to delete the content of the file, but keep the file itself. So… how can you do that?

In Linux, deleting file content while keeping the file is quite easy! Just use the following command from command line:

cat /dev/null > YOURFILENAME

I recommend you to backup the file first, because you never know when something bad can happen

Continue Reading

How to get the IP address using MAC

It happens alot that you have an IP device (ATA, door phone, …) and you don’t know the IP address. One easy way is to use nmap.

run this command (on linux of course):

$ nmap -sP <ip range>

eg: nmap -sP

make sure you run this as root otherwise it will show only ip address without the MAC

you can also save the output into a txt file this way:

eg: nmap -sP

You can also try using scanssh (next post will cover this)

Continue Reading

Cisco SPA 502G

How to configure CISCO SPA 502G phone

Step 1- Get the IP address of the phone
Step 2- Access to the GUI, by browse the IP address of the phone (e.g:
Step 3- Click on Admin login at top right of GUI
Step 4- Click Ext1, and fill in few needed info

Continue Reading