Lanka Developers Community

    Lanka Developers

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Shop
    1. Home
    2. binurayeshan
    3. Posts
    • Profile
    • Following 3
    • Followers 2
    • Topics 18
    • Posts 35
    • Best 19
    • Controversial 0
    • Groups 3

    Posts made by binurayeshan

    • RE: change read write execute permission of a file linux

      @shehan_s said in change read write execute permission of a file linux:

      SUPERRRRRRRRRRRRRRRRRRRRRB!

      Thanks for your comment it inspire me a lot

      posted in Linux
      binurayeshan
      binurayeshan
    • RE: Understand permission of a file in Linux

      @dev_lak said in Understand permission of a file in Linux:

      clear explanation, thank you

      Thank you very much

      posted in Linux
      binurayeshan
      binurayeshan
    • Bash script Array introduction

      හරි මම ඔයාලට දැන් කියලා දෙනනෙ Bash script වල Array use කරන විදිය
      මේ link වලින් ගිහින් ඔයාලට bash script ගැන කලින් කරපු post බලාගන්න පුලුවන්..
      Lets talk about bash script - https://lankadevelopers.com/topic/371/lets-talk-about-bash-script

      First bash script - https://lankadevelopers.com/topic/372/first-bash-script

      Sum of two numbers in bash script - https://lankadevelopers.com/topic/377/sum-of-two-numbers-in-bash-script

      #!/bin/bash
      
      fruits=(apple orange graphes banana)
      echo "${fruits[2]}" #print element 2
      echo "${fruits[@]}" #print all array elements 
      echo "${!fruits[@]}" #print array position 
      echo "${#fruits[@]}" #calculate array size
      
      fruits[1]=lemon #overwrite 1st element 
      echo "${fruits[@]}"
      
      fruits+=(orange) #add more value (අපිට පුලුවන් මේකෙන් array එකේ element වැඩි කරන්න)
      echo "${fruits[@]}" #print all array elements
      echo "${!fruits[@]}" #print array position
      

      0_1569460696930_Screenshot from 2019-09-26 06-47-45.png

      posted in Linux
      binurayeshan
      binurayeshan
    • How to copy and move files on linux

      හරි මම අද ඔයලට කියල දෙන්නෙ කොහොම්ද Linux වලදි File එක​ක් copy කරගන්නෙ Move කරගන්නෙ කියල 0_1569455450299_Screen Shot 2019-09-26 at 5.20.41 AM.png

      හරි ඔයාලට පේනව මගෙ මේ ෆොල්ඩර් එක ඇතුලෙ sample.txt කියල file ekak තියෙනව මම දැන් කියල දෙන්නම් කොහොමද එකේ copy ගන්නෙ කියල වෙනත් නමකින්

      cp sample.txt new.txt #මේ කියන්නේ sample.txt කියන file එකේ copy එකක් new.txt කියල ගන්න කියලා.
      
      

      0_1569455747004_Screen Shot 2019-09-26 at 5.25.39 AM.png

      හරි දැන් බලමු කොහොමද හදපු file එක කොහොමද වෙන තැනකට move කාරග්න්නෙ කිය​ලා

      mv new.txt /Users/yeshan/Desktop/new.txt # මුලින්ම මම file එකේ නම දෙනවා ඊට පස්සෙ move කරන්න ඕන directory එකේ නම දෙනවා ඊට පස්සෙ ඔයාට කැමති නමක් දෙන්න පුලුවන් එත්කොට ඒ නමින් තමයි file එක move වෙන්නෙ..
      
      

      0_1569457230372_Screen Shot 2019-09-26 at 5.36.18 AM.png

      posted in Linux
      binurayeshan
      binurayeshan
    • RE: Begineersla සඳහා ඩිජිටල් අලෙවිකරණ උපදෙස් කිහිපයක්.

      superb දිගටම කරගෙන යන්න ගොඩක් වටිනව

      posted in General Discussion
      binurayeshan
      binurayeshan
    • change read write execute permission of a file linux

      linux file permission ගැන දැන ගන්න - https://lankadevelopers.com/topic/382/understand-permission-of-a-file-in-linux
      හරි මම කියල දෙන්නම් දැන් කොහොමද linux file එකක permission වෙනස් කරන්නෙ කියල.

      0_1569376605126_Screen Shot 2019-09-25 at 6.46.17 AM.png

      මේ තියෙන්නෙ අපි හදා ගත්ත ෆයිල් එක sample.txt
      එයාට default permission විදියට ඇවිල්ල තියෙන්නෙ
      owner - read and write permission
      member - read only permission
      user - read only permission

      මම දැන් owner,group,user ඔක්ටකොටම මේ file එක execute කරන්න පුලුවන් විදියට permission දෙනව

      chmod +x sample.txt!
      

      0_1569376655050_Screen Shot 2019-09-25 at 7.24.19 AM.png

      දැන් ඔයා ඒ file එකේ permission බැලුවම ඔයාට පේනව් x කියල permission එක එයා​ලට හම්බුවෙලා තියෙනවා. ‍‍

      හරි දැන් අපි group membersලට permission දෙමු

      chmod g+w sample.txt # මේ කියන්නෙ group membersලට write permission දෙන්න කියල 
      

      0_1569376982177_Screen Shot 2019-09-25 at 7.31.30 AM.png

      ඔයාලට බලාගන්න පුලුවන්න් group membersලගෙ permission වෙනස් වෙලා තියෙන විදි​ය

      other usersලට permission දෙමු

      chmod o+w sample.txt
      

      0_1569377612870_Screen Shot 2019-09-25 at 7.43.20 AM.png

      ownerට විතරක් permission දෙමු

      chmod u+x sample.txt
      

      මේ විදියට ඔයාලට කැමති විදියට ෆයිල් වල permission දෙන්න පුලුවන්

      u — the user who owns the file (that is, the owner)
      g — the group to which the user belongs
      o — others (not the owner or the owner's group)
      a — everyone or all (u, g, and o)

      r — read access
      w — write access
      x — execute access

      posted in Linux
      binurayeshan
      binurayeshan
    • Understand permission of a file in Linux

      මම දැන් ඔයාලට කියල දෙන්න යන්නෙ කොහොමද අපි linux වලදි file එකකට read, write, execute කියන permission දෙන්නෙ කියල මේ post එකේදි මන් කියල දෙන්නම් කොහොමද permission check කරන්නෙ කියලා

      හරි මම මුලින්ම file එකක් හදනව
      0_1569374198712_Screen Shot 2019-09-25 at 6.46.17 AM.png

      ඔයාලට දැන් පේනව මේ file එකේ -rw-r--r-- කියල අකුරු වගයක් තියෙනව මේ තියෙන්නෙ users ලට permission බෙදිල යන විදිය.

      මේ තියෙන්නේ ප්‍රධාන permission 3
      r - read
      w - write
      x - execute

      0_1569374595380_Screen Shot 2019-09-25 at 6.52.59 AM.png

      rwx තුනම file එකේ පෙන්නනවා කියන්නේ එ file එකට read write execute කියන permission තුනම දීල තියෙනව් කියන එක.

      මේ වගේ set 3ක් එක ෆයිල් එකක තියෙනව එ මොනාද ඒ
      පලව්වෙනි සෙට් එක - ෆයිල් එක හදපු එක්කෙනාට තියෙන permisson (owner of the file )
      දෙවනි සෙට් එක - file එකට access තියෙන membersලට දෙන permission
      තුන්වෙනි සෙට් එක - අනිත් usersලට තියෙන permission

      posted in Linux
      binurayeshan
      binurayeshan
    • Simple linux commands for beginners part 2

      ලින්කුව for part 1 - https://lankadevelopers.com/topic/380/simple-linux-commands-for-beginners

      echo ”$SHELL”	 #අපි පාවිච්චි කරන ශෙල් එක බලන්න පුලුවන්
      echo ”$SHELL_VERSION”	#Check where the bash is located 
      pwd	#Current directory එකේ path එක බලන්න පුලුවන්
      echo ”Hello world”	#Print Hello world 
      cd Desktop	#Change current directory 
      d -	#Moving directory up by one level
      cd ~	#Go to Home directory
      ls 	#List out the directory content
      ls -al	#Get more information about file with access permission 
      ls -a	#list the all file including hidden files 
      rm sample.txt #file එකක් delete කරන විදිය 
      rm -d newfolder #directory එකක් delete කරන විදිය 
      .filename.extension	#Hidden the file (ෆයිල් එකේ නමට ඉස්සරහින් . එකක් තියන්න )
      ``
      posted in Linux
      binurayeshan
      binurayeshan
    • Simple linux commands for beginners

      මේ commands linux environment එකේ ඔයාලට භාවිතා කරන්න පුලුවන්

      uname -a 	 #used to print the system information
      uname -r	#Print the kernel release 
      uptime	#Display the time since the last boot
      hostname	#Get host name 
      hostname -i	#Host name ip address
      last reboot	#Last reboot time
      date	#Date information
      cal	#Carlander information 
      w	#provides a quick summary of every user logged into a computer,
      whoami      #Display username of the current user 
      who	#display the users that are currently logged into your Unix computer system
      id 	#Print user id and group id information
      df -h	#Disk space information
      df -t	#Disk types 
      
      posted in Linux
      binurayeshan
      binurayeshan
    • Sum of two numbers in bash script

      හරි අපි පලෙවෙනි script එකෙන් කතා කලා කොහමද bash script එකක් use karala දෙයක් print කරන්නෙ කියල අද අපි බලමු කොහොමද arithmatic operatorse use කරන්නෙ කියල.

      මම ඔයාලට කලින් post එකෙ කියල දුන්න විදියට bash script file එක හදාගන්න - https://lankadevelopers.com/topic/372/first-bash-script

      #!/bin/bash 
      
      num1=250 #value assign කරන විදිය 
      num2=500 #මතක තියාගන්න මෙ වගේම space තියන්නෙ නැතුව script එක ලියන්න 
      echo "number 1 = " $num1#number 1 එකේ value එක print කරන විදිය 
      echo "number 2 = " $num2
      echo "number 1 + number 2 =" $[num1 + num2]#value දෙකක් එකතු කරන විදිය 
      
      

      ඊට පස්සෙ මේ Script file එකට permission දීලා Run කරන්න

      posted in Linux
      binurayeshan
      binurayeshan
    • RE: First bash script

      @cody said in First bash script:

      @Binura-Yeshan-Samarawickrama patta thanks mchan

      thanks bro

      posted in Linux
      binurayeshan
      binurayeshan
    • RE: First bash script

      @root මම දැන් දන්න තරමින් windows 10 වලට shell script එක දුන්න

      posted in Linux
      binurayeshan
      binurayeshan
    • First bash script

      bash script file හදාගන්න විදිය..

      ඔයාගේ Terminal එක open කරන්න.
      ඒකෙ මෙන්න මේ command ටික දෙන්න -

      cd Desktop  #මේ කියන්නෙ ඔයාගෙ Desktop directory  එකට යන්න කියල 
      mkdir bash #මේ කියන්නෙ bash කියල folder එකක් හදන්න කියල 
      cd bash #මේ කියන්නෙ ඔයාගෙ bash කියල හදපු folder එකට යන්න කියල 
      touch ex1.sh #මේ කියන්නෙ ex කියන නමෙන් file එකක් හදන්න කියල ඒකෙ extension එකට මම දෙන්ව .sh කියල මොක්ද අපි හදන්නෙ bash file එකක් හින්ද
      

      දැන් ඔයාගෙ bash file එක හදල ඉවරයි. දැන් ඔයාට script එක ලියන්න පුලුවන්. දැන් ඔයා ඒ හදපු bash file එක sublime text හරි text editor එකක හරි open karaganna.

      #!/bin/bash 
      
      echo "Hellp bash"
      

      දැන් ඔයාගෙ terminal එකට ආයිත් ගිහින් මෙන්න මේ command ටික දෙන්න

      chmod +x ex1.sh  #මේ කියන්නෙ මේ file එකට  executable permission දෙන්න කියල
      ./ex1.sh #දැන් ඔයාට මේ file එක run කරන්න පුලුවන්
      
      posted in Linux
      binurayeshan
      binurayeshan
    • Lets talk about bash script

      bash script කියන්නෙ linux environment එකේ වැඩ කරන්කොට අපිට හම්බුවෙන script language එකක්. ගොඩක්ම මේ bash scripting අවශ්‍ය වෙන්නෙ linux administrator ඒ වගේම ethical hacking ගැන උනන්දු වන අයට. ඇත්තටම bash script එකක් ගත්තම ඒක linux command වල එකතුවක් විදියට දකින්නත් පුලුවන්.

      posted in Linux
      binurayeshan
      binurayeshan
    • 1
    • 2
    • 2 / 2