Skip to main content

Copy file/directory from Linux Cent OS to Window shared folder

1. Install with Samba client in Linux
yum install samba-client

2. Install with cifs-utils
yum install cifs-utils

3. Create a directory in Linux Cent OS (i named it as "shared")
mkdir /mnt/shared

4. Add in some line in fstab
vi /etc/fstab

# Mount Windows Share to /mnt/shared
[Window IP]:/[shared_folder_path] /mnt/shared cifs username=[window username],password=[window password] 0 0

5. Run the command below:
mount -a

6. Copy a file from Linux Cent OS to Window shared folder.

normal copy: cp -r [source] [destination]
e.g. cp -r [source path from linux centos] /mnt/shared

copy and overwrite existing copy: yes | cp -rf [source] [destination]
e.g. yes | cp -rf [source path from linux centos] /mnt/shared

7. Check from the shared folder to see the file/directory that copied.


Popular posts from this blog

It's a new experience for me

Okay, i think i'm kind of coward type, whenever there is some special occasion or some important tasks or duty being assigned to me, i will worry first, i know in another word, it's lack of confident.

For this time, I will be traveling to US on this coming September - of course - it's a business trip , and i will need to apply for US Visa and go for a Visa interview.

So, i completed the application on 7th July 2017 and the earliest Visa interview schedule will be on 25th July 2017.

During the Visa interview scheduling, i still don't feel the heat yet, i started to worry 4 days before the actual interview day.

Starts to imagine all the worst cases that might be happened before/during the interview, and even dream of it- a nightmare that i went to US Embassy without all my documents. **no doubt, i have a stack of documents prepared, from the business invitation letter, itinerary, identification card photocopy, blah blah blah.....and a super ugly 2 * 2 inches photo of min…

Skytrex Adventure-"Extreme Challenge"

Someone said that i will for sure upload the photo and show off with my strength... As i was incredibly,unexpectedly, unbelievably finished the 24 challenges of skytrex adventure... Uhoo... I so called that challenge as "One day Tarzan" challenges... As every challenges are on the platform at trees... The highest is 22 meters... I have conquered it... 12th the day... around 1pm...SZ,SW and TJ reached in my place... We take about 1 hour to reach the location... The sky was greyness...Finally, it was raining... As we reached in the destination...the rain stopped... We take the so called bus to reach at the Skytrex in the TPM... We went to the pondok to register ourselves...and signed a paper... i don't really read the something about any accident happen, it's on your own risk...and we required to fill in the people to contact if accident happen... We rent a locker to keep our stuffs (RM 5), bought a pair of gloves (RM3 per pair)... right after that we equipped w…