Category: Command Line

rsync Local Folder with Remote

Synchronize a local directory with a remote directory via ssh and compression rsync -az -e ssh –delete ip_addr:/home/public /home/local

Reboot History

Show history reboot last reboot

Change shell

Change shell command chsh

strace to find Library Calls

Display library calls strace -f -e open ls >/dev/null

FTP Using Curl

Copy a file to a remote system using FTP with the Curl command… curl -T filename.txt -u username:password ftp://example.cot/filename.txt Original…

Use DD to Create File of any Size

Use the DD command to create a 10 MB (10*1024*1024=10485760 bytes) size file named testfile_10MB dd if=/dev/zero of=testfile_10MB bs=10485760 count=1…

SCP Copy from Remote to Local System

Copy files/folder from a remote server to this system. scp -r binnyva@192.168.0.100:/home/binnyva/folder_to_copy .

Copy Files using SCP

Copy files/folder to a remote server. scp <file> binnyva@192.168.0.100:/home/binnyva/ scp -r <folder> binnyva@192.168.0.100:/home/binnyva/

Executing SQL Query From Command Line

Print out the result of an SQL query directly from the database using the mysql command mysql -u root Project_Tiker…

Using strace

Display system calls made and received by a process strace -c ls >/dev/null