I am new to linux. for one my new project ,the requirement is
we will have a textfile(.txt) in a local harddisk of the Desktop which is having linux OS(Red Hat Enterprise Linux 4) with kernel version 2.6.20.14. We need to write a small application program in C language which will do the following action:
1) Whenever the USB is connected in the Desktop, the C program has to transfer the textfile to the USB disk automatically.
For executing this we would like to clarify the followings:
a) How to find the presence of USB disk through my C program?
b) How to transfer the textfile to USB disk through my C program automatically after detecting the USB disk?
If any one can give a solution for this, it will be really helpful.
Thanks,
Unnikrishnan

Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 32GB RAM No HDD
$378.93
Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram 2x 550W PSU No HDD
$275.00
Dell Poweredge R810 4x Xeon X7560 2.26ghz 32-Cores | 256GB | 3x Trays | H700
$289.99
Dell Poweredge C4130 2x LGA2011-3 1U 4x GPU Rackmount Server CTO (NO CPU/NO RAM)
$299.95
Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Cores / 64gb / Raid / 2x 1Tb
$374.99
Dell PowerEdge C4130 1U AI GPU Server | 2x E5-2680 v3 | 32gb Ram | 2x 1600W
$409.99
Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Core | HBA330 | No RAM or HDD
$149.99
Dell PowerEdge R730 8 Bay Server 64Gb 1x80Gb SSD 3x900Gb SAS 2x12c v4CPU Proxmox
$620.00
Dell PowerEdge R530 2x E5-2630v4 H330 iDRAC8 Port Card Riser No PSU/RAM/HDD
$99.99
Dell PowerEdge FX2s + 8x FC430 Blades 16x E5-2630v4 160 Cores Rails No PSU/RAM
$699.00