Archive for the ‘Linux Issues’ Category

Linux SCP: how to copy a file from another server

Wednesday, May 26th, 2010

scp user@host:/path/to/file /root

After you hit the enter it will ask remote servers password.
When you entered the password file under /path/to/ will copy to local /root folder

Shell Grep: Search a word in a file

Wednesday, May 26th, 2010

Just type:

grep -i yourword /etc/php5/apache2/php.ini

How to tar a directory?

Friday, May 21st, 2010

I just needed to tar a directory with all files inside of it under Debian 5.

Open shell prompt or putty whatever and write:

tar -cf “files.tar” /path/to/yourfiles

by the way “c” means youre creating a tar file and “f” means you want to use a file name as you pleased.

If you want to update this tar file you can use:

tar -uf “files.tar” /path/to/yourfiles