Showing posts with label HowTo. Show all posts
Showing posts with label HowTo. Show all posts

Friday, 6 April 2018

Folder Sharing in Ubuntu Linux with Samba

A Samba file server enables file sharing across different operating systems over a network. It lets you access your desktop files from a laptop and share files with Windows.



Installation -
sudo apt update
sudo apt install samba



Check Installation -
whereis samba

The following should be its output:

samba: /usr/sbin/samba /usr/lib/samba /etc/samba /usr/share/samba /usr/share/man/man7/samba.7.gz /usr/share/man/man8/samba.8.gz



Create samba conf file backup

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.orig


Add Folder entry in /etc/samba/smb.conf which you want to share as below -

[Friends]                        # share folder name
    path = /home/atul/Desktop/Friends   # folder path
    read only = no                    
    browsable = yes



Start Samba Service
sudo systemctl restart smbd
sudo service smbd restart



Check if all working as configured
testparm


Now, Set password Samba User -
sudo smbpasswd -a <user_name>   # user_name should be existing system user


Share the Folder link to respective users -
Windows User - \\ip-address\Friends
Ubuntu User  - smb://ip-address/Friends





Like the below page to get update  
Facebook Page      Facebook Group      Twitter Feed      Google+ Feed      Telegram Group     


Monday, 7 November 2016

Modify Stage - Drop Columns

Monday, 25 April 2016

Suppress Warnings - A Quick DataStage Recipe



Recipe:

How to suppress job warnings in DS job log

HowTo:

Add "rule" in Message Handler

www.datagenx.net

Method:

From DS Director, from Message Handler, add a rule
Select Warning message as example of Message text
Or
Open the job log, select the message you want to suppress
right click and add in Message Handler





Like the below page to get update  
https://www.facebook.com/datastage4you
https://twitter.com/datagenx
https://plus.google.com/+AtulSingh0/posts
https://datagenx.slack.com/messages/datascience/

Thursday, 31 March 2016

echo the 'echo'




"echo" command is the very basic command of Linux/Unix. Most of us known this command to print whatever is being passed to it as argument. So let's revise once more if we are missing something here.


"echo" command prints its argument by single space.
[atul@localhost ~]$ echo Atul learns commands 
Atul learns commands

print argument by single space mean it will suppress the space between its arguments.
[atul@localhost ~]$ echo Atul          learns                         commands 
Atul learns commands

if you want to preserver the space between them, we need to make these 3 argument to 1 by using a quote.
[atul@localhost ~]$ echo "Atul     learns   commands" 
Atul     learns   commands



One more example :



** Need to remember -
* echo expect arguments to print whether they are separated by single space or multiple, it will print them with single space
* if you want to keep multiple space in argument string, make them one argument by quoting them.