This document provides an overview of various commands and features in Unix. It discusses logging in and managing files and directories using commands like cat, touch, mkdir, cp, mv, rm, and vi editor. Network tools like write, talk, mail and wall are also covered. The document elaborates on filters like grep, sed and awk. It explains linking files using hard links and soft links. Finally, it discusses process scheduling and killing processes. The entire document is a guide for learning Unix/Linux with examples of commands and their usage. For any issues, users are advised to contact support@k21technologies.com.
Slides from the Introduction to UNIX Command-Lines class from the BTI Plant Bioinformatics course 2014. This is a course teach by the Sol Genomics Network researchers at the Boyce Thompson Institute.
Slides from the Introduction to UNIX Command-Lines class from the BTI Plant Bioinformatics course 2014. This is a course teach by the Sol Genomics Network researchers at the Boyce Thompson Institute.
Devops for beginners is basically for the developers who really want to jumps towards DevOps processes and tools. Guide will give basic about what is cloud and virtualisation ?
What are different clouds solutions available?
Most useful and used linux commands with detail description about them.
Linux directory structure and usage.
Basically it will cover all the basics of Linux Administration and cloud concepts.
Basic of and Unix and Command. More presentation you can find on www.scmGalaxy.com.
scmGalaxy.com is dedicated to software configuration, build and Release management. This covers CVS, VSS (Visual Source Safe),Perforce, SVN(Subversion) MKS Integrity, ClearCase,TFS,CM Synergy, Best Practices ,AnthillPro, Apache Ant, Maven, Bamboo, Cruise Control and many more tools.
Piping into PHP
Not the kind of pipe you smoke :) Though traditionally used to build websites, PHP has a great deal of often unused functionality. In this talk we will explore Unix named pipes and how we can start a PHP process which listens for input while it is running.
Tool Development 08 - Windows Command PromptNick Pruehs
Chapter 08 of the lecture Tool Development taught at SAE Institute Hamburg.
Introduction to the windows command prompt, and command-line arguments and calling external programs in .NET.
This Operating System lab manual is designed strictly according to BPUT Syllabus.Any suggestions or comments are well come at neelamani.samal@gmail.com
Devops for beginners is basically for the developers who really want to jumps towards DevOps processes and tools. Guide will give basic about what is cloud and virtualisation ?
What are different clouds solutions available?
Most useful and used linux commands with detail description about them.
Linux directory structure and usage.
Basically it will cover all the basics of Linux Administration and cloud concepts.
Basic of and Unix and Command. More presentation you can find on www.scmGalaxy.com.
scmGalaxy.com is dedicated to software configuration, build and Release management. This covers CVS, VSS (Visual Source Safe),Perforce, SVN(Subversion) MKS Integrity, ClearCase,TFS,CM Synergy, Best Practices ,AnthillPro, Apache Ant, Maven, Bamboo, Cruise Control and many more tools.
Piping into PHP
Not the kind of pipe you smoke :) Though traditionally used to build websites, PHP has a great deal of often unused functionality. In this talk we will explore Unix named pipes and how we can start a PHP process which listens for input while it is running.
Tool Development 08 - Windows Command PromptNick Pruehs
Chapter 08 of the lecture Tool Development taught at SAE Institute Hamburg.
Introduction to the windows command prompt, and command-line arguments and calling external programs in .NET.
This Operating System lab manual is designed strictly according to BPUT Syllabus.Any suggestions or comments are well come at neelamani.samal@gmail.com
Workshop on command line tools - day 1Leandro Lima
Slides of the I Workshop on command-line tools with the collaboration of CAG (Center for Applied Genomics - Children's Hospital of Philadelphia) bioinformatics analysts.
1st day
This lecture discusses the commands and tools used to deal with text and text files in Linux. This includes displaying, concatenation, editing, searching, sorting, comparing text files. It also discusses the generation and usage of patch files
Check the other Lectures and courses in
http://Linux4EnbeddedSystems.com
or Follow our Facebook Group:
- Facebook: @LinuxforEmbeddedSystems
Lecturer Profile:
- https://www.linkedin.com/in/ahmedelarabawy
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Overview on Linux
1. If there is any issue at setup or connection contact support@k21technologies.com
Overview of Unix
Activity Guide 1
[Edition 1]
[Last Update 130815]
For any issues/help contact : support@k21technologies.com
2. If there is any issue at setup or connection contact support@k21technologies.com
Sno Topics
1 IntroductiontoUnix,History,Versions,Features.FileSystems
2 LoggingIn,Password,CreatingFilesandDir.Removingfilesanddir.
3 Additional commands (uname,mv,date,,lsoptions,finger,who,cal.
Copyingusing(absolute,relative)method,
Wild characters, redirection(?, *,[] ),(stdin, stdout, stderr)
4 Fileaccesspermissionschmod(absolute,symbolic),umask.Simplefilters(more,less,wc,sort,
cut,paste,tr)
5 Editors-vi(advance)-3modes-escape,insert,colon
6 Searchingfilesusingfindcommandbyusingvariousoptions,communicationstools-using
write,talk, mail, wall commands
7 Advancefilters(grep,sed,awk)
8 Linkingfilesusinghardlinkandshortlink,processscheduling-backgroundprocess,killing
process
3. If there is any issue at setup or
connection contact
support@k21technologies.com
CompaniesthatlaunchedMULTICS
4. If there is any issue at setup or connection contact
support@k21technologies.com
IBM Mainframe Computers
5. If there is any
issue at setup or
connection
contact
support@k21tec
hnologies.com
KenThompson
6. If there is any
issue at setup or
connection
contact
support@k21tec
hnologies.com
Linus Torvolds
7.
8.
9. If there is any issue at setup or
connection contact
support@k21technologies.com
General Operating SystemDiagram
10.
11.
12. If there is any issue at
setup or connection
contact
support@k21technolo
gies.com
FileSystemofUnix
13. If there is any issue at setup or connection contact
support@k21technologies.com
Directory Structure & its contents
OrdinaryFiles
14. If there is any issue at setup or connection contact support@k21technologies.com
Devi ces
Directories
Links
15. If there is any issue at setup or connection contact support@k21technologies.com
Basic Commands
Creating,Removing,Copying,Moving files& directories
Creatinga file inLinux
Usingcat command:
Cat (concatenate) commandisusedtocreate a file andto displayandmodifythe contents
of a file.
To create a file.
#cat > filename(sayktfile)
HelloWorld
Ctrl+d (to save the file)
To Displaythe contentof the file
#cat filename (sayktfile)
To append (edit)thedatainthe alreadyexistingfile
#cat >> <filename>
#cat >> ktfile
Ctrl+d (tosave the changes)
16. If there is any issue at setup or connection contact support@k21technologies.com
Creatingmultiplefilesatsame time usingtouchcommand andto checkthe fileswith“ls”command
#touch <filename1><filename><filename>
Creatinga Directory
#mkdir<dir name>
Making multipledirectoriesinside adirectory
Checkit byusingtree command or ls –R command
17. If there is any issue at setup or connection contact support@k21technologies.com
CopyingfilesintoDirectory
#cp <source filename><destinationdirectoryinwhichtopaste the file>
#cp file1ktdir
18. If there is any issue at setup or connection contact support@k21technologies.com
Copyingdirectoriesfromone locationtoother
#cp –rvfp<dir name><destinationname>
Movingfilesfromone locationtoother(cutand Paste)
#mv <filename><Destinationdirectory>
MovingDirectoryfromone locationto other
#mv <filename><Destinationdirname>
#mv ktdirktdir2
RenamingaFile
19. If there is any issue at setup or connection contact support@k21technologies.com
#mv <oldname> <newname>
RenamingaDirectory
The procedure andcommand forrenamingthe directoryisexactlysame asrenamingafile.
#mv <oldname><newname>
#mv ktdirkerneldir
RemovingaFile
#rm filename or#rm –f filename(withoutprompting)
20. If there is any issue at setup or connection contact support@k21technologies.com
RemovinganEmptyDirectory
#rmdir dirname
Removingadirectorywithfilesordirectoriesinside:
A di wichis havingsome contentsinsideitcannotbe removedbyrmdir command.There are two
waysto delete the direcotywithcontents.
Remove the contentsinsidethe directoryandthenrunrmdircommand
#rmdir –rf dirname( where rstandsforrecursive andf stands forforcefully).
21. If there is any issue at setup or connection contact support@k21technologies.com
VIMEDITOR
VIVisual Displayeditor
VIMVisual Displayeditorimproved
Thisis commandmode editorforfiles.OthereditorsinLinux are emacs,gedit.Vi editorismost
popularithas 3 modes(1 CommandMode,2 InsertMode,3 extendedcommandmode)
Note:whenyouopenthe vimeditor,itwill be inthe commandmode bydefault.
In the commandmode the cursor’scan be usedas h/l/k/j tomove cursorleft/right/up/down
Insert mode
i To begininsertmode atthe cursor position
I To insertat the beginningof line
a To appendto the nextword’sletter
A To appendat the endof the line
o To inserta newline belowthe cursorposition
O To inserta newline above the cursorposition
Command Mode
gg To go to the beginningof the page
22. If there is any issue at setup or connection contact support@k21technologies.com
G To go to the endof the page
w To move the cursor forward,wordby word
b To move the cursor backward,wordby word
nw To move the cursor forwardto n words(5W)
nb To move the cusor backwardto n words(5B)
u To undolast change (word)
U To undothe previouschanges(entire line)
Ctrl+R To redothe changes
Yy To copy a line
Nyy To copy n lines(5yyor4yy)
p To paste line belowthe cursorposition
P To paste line above the cursorposition
dw To delete the wordletterbyletter(like Backspace)
x To delete the worldletterbyletter(like DEL Key)
dd To delete the entire line
ndd To delete nno.Of linesfromcursor position(5dd)
/ To search a wordin the file
ExtendedMode:(ColonMode)
ExtendedMode isusedforsave and quitor save withoutquitusing“Esc” keywith“:”
Esc+:w To Save the changes
Esc+:q To quit(Withoutsaving)
Esc+:wq To save and quit
Esc+:w! To save forcefully
Esc+wq! To save and quitforcefully
Esc+:x To save and quit
Esc+:X To give passwordtothe file andremove password
Esc+:20(n) To go to line no.20 or n
Esc+: se nu To setthe line numberstothe file
Esc+:se nonu To Remove the setline numbers
To openmultiple filesinvimeditor
#vim–o file1file2
To Switchbetweenfilesuse Ctrl+w
ListingfilesandDirectories
23. If there is any issue at setup or connection contact support@k21technologies.com
#ls List the file names
#ls –l Long listof the file
#ls –l filename To see the permissionsof aparticularfile
#ls –al Showsthe filesinascendingorderof modification.
#ls p* All the filesstartwithp.
#ls ?ample Fileswithanyfirstcharacterand has ample
#ls –ldl* Directorylistingonly
#ls –lddirectoryname To see the permissionsof aparticulardirectory
#ls [ae]* Firstcharacter of the filename mustbe aor e.
#ls [!ae]* ! Symbol complementsthe conditionthatfollows.The charactersmust
not be a or e.
Typesof Files
Symbol Type of File
- Normal file
d Directory
l Linkfile (shortcut)
b Blockfile (Harddisk,Floppydisk)
c Character file (Keyboard,Mouse)
P A namedpipedfile isusedforinterprocesscommunication
S Its isa socketfile usedforinterprocesscommunication
D A doorfile .it isa special file forinterprocesscommunication (sunsolaris)
SymbolicLink
There are twotypesof Links:-
S.No. SoftLink Hard Link
1 Size of linkfile isequal tono.Of characters inthe name
of the original file.
Size of bothfile issame
2 Can be createdacross the partition Can’tbe createdacross the
partition.
3 inode no.Of source and linkfile isdifferent inode no.Of both file issame
4 If original file isdeleted,linkisbrokenanddataislost If original file isdeletedthen
alsolinkwill containdata
5 SHORCUT FILE BACKUPFILE
24. If there is any issue at setup or connection contact support@k21technologies.com
Creatinga softlink:
#ln -s<source file><destination>
CreatingHard Link
#ln <source file><Destination>
Grep:
Grep standsfor Global RegularExpression Print.It isusedto pickout the requiredexpressionfrom
the file andprintthe output.If grep iscombinedwithanothercommanditcan be usedto pickout
the selectedword,phrase fromthe outputof the firstcommandand printit.
Examplesof Grep
Let uspick the informationaboutrootfromthe file /etc/passwd(/etc/passwdconatainsinformation
aboutall the userspresentinthe system)
#grep root/etc/passwd
25. If there is any issue at setup or connection contact support@k21technologies.com
To avoidcase sensitivityof the word(i.e the wordmaybe uppercase of lowercase) use -i
#grep -i IT ktfile (letsgrepthe word IT whetherupperof lowercase inthe file ktfile)
To displayaword and 2 linesafterthe word
To displayaword and 2 linesafterthe word
To displaythe things exceptthe givenword
To displaythe searchedwordincolor
26. If there is any issue at setup or connection contact support@k21technologies.com
Combininggrepwithothercommands
FilterCommands:
filtercommandsare usedtofilterthe outputsothat the requiredthingscaneasilybe pickedup.The
commandswhichare used to filterthe outputare
#less
#more
#head
#tail
#sort
#cut
#sed
27. If there is any issue at setup or connection contact support@k21technologies.com
less:- The lesscommand is usedto see the output line wise or page wise.
Note:-
pressEnterkeyto scroll downline byline (or)
Use d to go to nextpage
Use b to go to previouspage
use / to searchfor a wordin the file
Use v to go vi mode where youcan editthe file andonce yousave it youwill backto lesscommand
more: more isexactlysame like less
28. If there is any issue at setup or connection contact support@k21technologies.com
Ex: #more /etc/passwd
Note:-
pressEnter keyto scroll downline byline (or)
use d to go to nextpage
use / to searchfor a wordin the file
Use v to go vi mode where youcan editthe file andonce yousave ityou will backtomore command
head: it is usedto displaythe top 10 linesof the file.
ex:# head/etc/passwd
To display the custom lines
#head -n /etc/passwd (where n can be any number)
tail: It is usedto displaythe last 10 linesofthe file
#tail /etc/passwd
29. If there is any issue at setup or connection contact support@k21technologies.com
To display the custom lines
#tail -n /etc/passwd(where n can be any number)
sort: It is usedto sort the output in numeric or alphabeticorder
#sort filename
30. If there is any issue at setup or connection contact support@k21technologies.com
To sort the file accordingto numbers
#sort -dktfile
To remove the duplicate entriesfrom the output
#sort -uktfile
31. If there is any issue at setup or connection contact support@k21technologies.com
cut command:
The cut commandisusedto pick the givenexpression(incolumns) anddisplaythe output.
#cut -d -f filename(where dstandsfordelimiterex.:," "etcand f standsfor field)
32. If there is any issue at setup or connection contact support@k21technologies.com
To delimitspacesandprintthe field
#cut -d "" -f1 filename
To delimitcommasandprintthe field
#cut -d, f1 filename
sedcommand
sedstands forstreameditor,whichisusedtosearch a word inthe file andreplace itwiththe word
requiredtobe inthe output.
Note:- itwill onlymodifythe output,butthere will be nochange inthe original file.
sed's/searchfor/replacewith/g' filename
Redirection:Redirectionisaprocesswhere we cancopy the outputof anycommand(s),file(s) intoa
newfile.There are twowaysof redirectingthe outputintoafile.
Using> or >> filename afterthe command,and usingtee command
Note:if the givenname of the file isnotavilable anew file will be createdautomatically.If the file
alreadyexiststhenitwill overwrite contentsof thatfile.
33. If there is any issue at setup or connection contact support@k21technologies.com
Appendinganotheroutputinsame the same file
Likewise thereare manyoptionswhere we canuse redirections
Ex: copyingcontentsof twofilesinanew file
#cat file1file2>file3
Usingtee
The above optionsof redirectionswill notdisplayanyoutput,butdirectlysave the outputinafile.
usingtee commandwill notonlyredirectthe outputtonew file butitwill alsodisplaythe output.
Syntax:cat <filename>|tee <newfile name>
Note:If the givenof the file (newfile)isnotavailable anew file will be createdautomatically.If the
file alreadyexiststhenitwill overwrite contentsof the file.
#cat ktfile |tee ktf1
34. If there is any issue at setup or connection contact support@k21technologies.com
Appendingdatainthe same file usingtee command
Syntax: cat filname | tee -a filename2
#cat ktfile1| tee -a ktf1
FindCommand
findcommandis usedto findthe filesordirectory'spath, itisexactlylike the findoptioninwindows
where youcan searchfor a file.
Syntax: find / (underroot) - option filename
optionsthatcan be usedwithfindcommand:
Option Usage
-name For searchinga file withitsname
-inum For searchinga file withparticularinodenumber
-type For searchinga particulartype of file.
-user For fileswhose owner
-group For filesbelongingtoparticulargroup
35. If there is any issue at setup or connection contact support@k21technologies.com
Findingafile withname
#find/ -name test
#find/ -num5934
Findingthe files,whose ownerisausercalled"abc"
Findingthe fileswhose groupis"abc"
36. If there is any issue at setup or connection contact support@k21technologies.com
File Permissions
Permissionsare appliedonthree levels:-
Owneror User level
Group level
Otherslevel
Accessmodesare of three types:-
r readonly
w write/edit/delete/append
x execute/runacommand
Accessmodesare differentonfile anddirectory.
PERMISSIONS FILES DIRECTORY
r Openthe file 'ls' the contentsof dir
w Write,edit,append,deletefile Add/Del/Renamecontentsof
dir
x To run a command/shell script To enterintodirusing'cd'
r : For normal or directoryfile - viewthe contents
w: Editthe contentsof a normal or directoryfile
37. If there is any issue at setup or connection contact support@k21technologies.com
x: Runan executable file /Enterintodirectoryfile
Permissionscanbe seton any file/dirbytwomethods:-
1. Symbolicmethod (ugo)
2. Absolute method(numbers)
SymbolicMethod
Symbolicmode:General formof symbolicmode is
#chmod [who] [+/-/=] [permissions] file
who> to whomthe permissionstobe assigned
user/owner(u);group(g);others(o)
Example:- Assigndifferrentpermissionstothe file (user=rwx,group=rw andothers=r)
#chmod u=rwx,g=rw,o=r ktfile(where ktfileisthe name of the file)
38. If there is any issue at setup or connection contact support@k21technologies.com
Assigningfullpermissiontothe file i.e rwx toall
#chmod ugo=rwx <file name>
likewise youcanaddor remove permissionsfromanyfile foranyone(usergrouporother)
#chmod u+x ktfile (addingexecutepermissionstouseronly)
#chmod go-wx ktfile(Removingwrite andexecutepermissionsfromgroupandother)
#chmod go+wx ktfile (Addingwriteandexecute permissionsfromgroupandother)
#chmod go=r ktfile (Givingonlyreadpermissiontogroupandother)
ABSOLUTE METHOD(NUMBERS)
In Absolute methodwe use numbersinsteadof usingsymbolsi.e
Read = 4
Write = 2
Execute = 1
Assigningdifferentpermissionstothe file (user=rwx,group=rw andothers=r)
#chmod 764 ktfile (where 7 means rwx i.e 4+2+1, rw=6 i.e 4+2 and 1 indicatesx)
39. If there is any issue at setup or connection contact support@k21technologies.com
Assigningfullpermissionstothe file i.e rwx toall
#chmod 777 ktfile
likewise youcangive differentpermissionsaccordingtoyour requirement
Removingall permissionsfromothers
#chmod 770 ktfile (where 0 indicatesno permissions)
Note:All the above permissionsandprocedure issame forfilesanddirectories
Umask
Whenwe create any file usingtouch,cator vi commandstheygetcreatedwithdefaultfile
permissionsasstoredinumask(userfilecreationmask).umaskisa4 digitoctal numberwhichtells
unix whichof the three permissionsare tobe deniedratherthangranted.Umask will decidethat
whatshouldbe the defaultpermissionsforafile anddirectorywhenitiscreated.
the defaultumask value is 0022
40. If there is any issue at setup or connection contact support@k21technologies.com
calculationof defaultpermissionsforfile anddirectory,basinguponthe umaskvalue
Note:For a file bydefaultitcannothave the execute permissions,sothe maximumfull permission
for a file atthe time of creationcan be 666 (i.e 777 -111 = 666), whereasadirectorycan have full
permissionsi.e777
The full permissionsforthe file 666
Minusthe umaskvalue -022
The defaultpermissionforfile is 644 (rw-,r--,r--)
The full permissionsforthe directory 777
Minusthe umaskvalue -022
The defaultpermissionforfile is 755 (rwx,r-x,r-x)
#umask002
The modifieddefaultpermissionforafile will be 666-002=664 i.e.rw,rw,r,andforthe directoryit
will be 777-002=775 i.e.rwx,rwx,r-x
41. If there is any issue at setup or connection contact support@k21technologies.com
Note:Create a file anda directoryandcheckfor the defaultpermissions.
These were the fewthings amongst the basics; keepworkingto furnishyour basics. After all,if the
foundationis good thenonly the buildingcan stand still"
=============End of the Activity 1 Guide========