Question : What is the primary goal of Agile development? Delivering a fully defined product at the end of the project Adhering strictly to a detailed project plan Embracing change and delivering incremental value Following a rigid and inflexible development process Correct Answer : Embracing change and delivering incremental value Question : Which Agile principle emphasizes the importance of individuals and interactions over processes and tools? Customer collaboration over contract negotiation Responding to change over following a plan Individuals and interactions over processes and tools Working software over comprehensive documentation Correct Answer : Individuals and interactions over processes and tools Question : What is the duration of a typical Agile iteration or timebox known as? Sprints Milestones Phases Waterfall Correct Answer : Sprints Question : In Agile, what is the role of a Product Owner? Managing the development team Ensuring the quality of the code Representing the customer and defining product requirements Writing detailed technical specifications Correct Answer : Representing the customer and defining product requirements Question : Which Agile practice involves the development team providing a potentially shippable product increment at the end of each sprint? Sprint Planning Daily Stand-up Sprint Review Sprint Retrospective Correct Answer : Sprint Review Question : What is the purpose of a burndown chart in Agile? Tracking the remaining work in a sprint Evaluating the team's velocity Monitoring the progress of individual team members Identifying bottlenecks in the development process Correct Answer : Tracking the remaining work in a sprint Question : Which Agile value promotes collaboration with customers throughout the development process? Customer satisfaction through early and continuous delivery Welcome changing requirements, even late in development Working software is the primary measure of progress Sustainable development, able to maintain a constant pace Correct Answer : Customer satisfaction through early and continuous delivery Question : What is the purpose of the Daily Stand-up (Scrum) or Daily Stand-up (Kanban) in Agile? Detailed status reporting Problem-solving session Review of completed tasks Brief team synchronization and planning for the day Correct Answer : Brief team synchronization and planning for the day Question : Which Agile practice involves the team reflecting on their performance and identifying improvements at the end of each sprint? Sprint Planning Daily Stand-up Sprint Review Sprint Retrospective Correct Answer : Sprint Retrospective Question : What is the purpose of the Scrum Master role in Scrum Agile framework? Managing the product backlog Facilitating and supporting the Scrum team Deciding the priority of user stories Writing test cases Correct Answer : Facilitating and supporting the Scrum team Question : Which Agile value emphasizes the importance of maintaining a sustainable pace of work? Customer satisfaction through early and continuous delivery Welcome changing requirements, even late in development Working software is the primary measure of progress Sustainable development, able to maintain a constant pace Correct Answer : Sustainable development, able to maintain a constant pace Question : What is the purpose of the "Definition of Done" in Agile? Identifying tasks to be completed in the next sprint Defining acceptance criteria for user stories Outlining the responsibilities of each team member Specifying when a task is considered complete Correct Answer : Specifying when a task is considered complete Question : In Agile, what does the term "velocity" refer to? The speed of the development team The rate at which user stories are completed in a sprint The time taken for code deployment The frequency of customer feedback Correct Answer : The rate at which user stories are completed in a sprint Question : What is the primary role of the development team in Agile? Defining product requirements Creating a detailed project plan Delivering a potentially shippable product increment Managing customer relationships Correct Answer : Delivering a potentially shippable product increment Question : Which Agile framework is often associated with continuous delivery and deployment practices? Scrum Kanban Extreme Programming (XP) Crystal Correct Answer : Extreme Programming (XP) Question : In Agile, what is the purpose of a "user story"? A detailed project plan A narrative description of a feature from an end-user perspective A task assigned to a team member A comprehensive list of software requirements Correct Answer : A narrative description of a feature from an end-user perspective Question : Which Agile value promotes the idea of welcoming changes in requirements, even late in the development process? Customer satisfaction through early and continuous delivery Welcome changing requirements, even late in development Working software is the primary measure of progress Sustainable development, able to maintain a constant pace Correct Answer : Welcome changing requirements, even late in development Question : What is the purpose of a Kanban board in Agile development? Tracking the progress of user stories Facilitating sprint planning meetings Defining acceptance criteria for tasks Identifying bottlenecks in the development process Correct Answer : Tracking the progress of user stories Question : In Agile, what is the role of a "stakeholder"? A team member responsible for quality assurance A customer representative involved in the project The leader of the development team A project manager overseeing the entire process Correct Answer : A customer representative involved in the project Question : Which Agile principle emphasizes the importance of continuous attention to technical excellence and good design? Delivering a fully defined product at the end of the project Welcome changing requirements, even late in development Continuous attention to technical excellence and good design Responding to change over following a plan Correct Answer : Continuous attention to technical excellence and good design Question : What is the primary goal of Scrum in software development? Following a strict plan Delivering a fully defined product at the end of the project Embracing change and delivering incremental value Focusing on comprehensive documentation Correct Answer : Embracing change and delivering incremental value Question : In Scrum, what is the role of the Scrum Master? Managing the product backlog Facilitating and supporting the Scrum team Deciding the priority of user stories Writing test cases Correct Answer : Facilitating and supporting the Scrum team Question : What is the duration of a typical Sprint in Scrum? 1 week 2 weeks 3 weeks 4 weeks Correct Answer : 2 weeks Question : Which Scrum event involves the Scrum Team reviewing what was accomplished in the Sprint and what was not accomplished? Sprint Planning Daily Scrum Sprint Review Sprint Retrospective Correct Answer : Sprint Review Question : What is the purpose of the Daily Scrum in Scrum methodology? Detailed status reporting Problem-solving session Review of completed tasks Brief team synchronization and planning for the day Correct Answer : Brief team synchronization and planning for the day Question : In Scrum, what is the primary responsibility of the Product Owner? Managing the development team Ensuring the quality of the code Representing the customer and prioritizing the product backlog Writing detailed technical specifications Correct Answer : Representing the customer and prioritizing the product backlog Question : What does the term "Product Backlog" represent in Scrum? Completed features in the current Sprint A list of tasks for the Scrum Master An ordered list of features and enhancements for the product A backlog of bugs and issues Correct Answer : An ordered list of features and enhancements for the product Question : Which role is responsible for making sure the Scrum Team adheres to the Scrum values and practices? Product Owner Scrum Master Development Team Stakeholder Correct Answer : Scrum Master Question : What is the primary purpose of the Sprint Retrospective in Scrum? Planning the next Sprint Reviewing and improving the team's processes Demonstrating completed work to stakeholders Daily check-in for progress tracking Correct Answer : Reviewing and improving the team's processes Question : In Scrum, what is the timebox for the Sprint Planning meeting? 1 hour 2 hours 4 hours 8 hours Correct Answer : 4 hours Question : Who is responsible for accepting or rejecting work results during the Sprint Review in Scrum? Scrum Master Development Team Product Owner Stakeholders Correct Answer : Product Owner Question : What is the purpose of the "Definition of Done" in Scrum? Identifying tasks to be completed in the next Sprint Defining acceptance criteria for user stories Outlining the responsibilities of each team member Specifying when a task is considered complete Correct Answer : Specifying when a task is considered complete Question : In Scrum, what is the recommended size for a Development Team? 3-5 members 5-7 members 7-9 members 9-12 members Correct Answer : 5-7 members Question : What is the purpose of the "Sprint Goal" in Scrum? Identifying the overall project goal Setting a goal for individual team members Defining the focus for the current Sprint Establishing long-term development objectives Correct Answer : Defining the focus for the current Sprint Question : What is the role of the Development Team in Scrum? Defining product requirements Creating a detailed project plan Delivering a potentially shippable product increment Managing customer relationships Correct Answer : Delivering a potentially shippable product increment Question : Which artifact in Scrum represents a snapshot of the work that still needs to be completed in the Sprint? Burnup chart Burndown chart Product Backlog Sprint Backlog Correct Answer : Sprint Backlog Question : What is the role of stakeholders in Scrum? Implementing technical solutions Representing the customer and defining requirements Facilitating Sprint Planning meetings Observing the Sprint Review Correct Answer : Observing the Sprint Review Question : In Scrum, what is the purpose of the "Increment" at the end of a Sprint? Completed features in the current Sprint A snapshot of the current product state A list of completed tasks A report on team performance Correct Answer : A snapshot of the current product state Question : What is the primary focus of the Daily Scrum meeting in Scrum? Discussing project timelines Solving complex technical issues Reviewing and adjusting the team's progress towards the Sprint Goal Updating the Product Backlog Correct Answer : Reviewing and adjusting the team's progress towards the Sprint Goal Question : Which Scrum value promotes the idea of committing to achieving the Sprint Goal and respecting each other's commitments? Focus Courage Openness Commitment Correct Answer : Commitment
Featured
DSA Interview Question
Question: Various S orting algorithms Answer: There are various sorting algorithms, each with its own advantages and disadvantages in terms ...
BDD MCQ
Question : What is the primary purpose of a BDD framework in software development?
Code compilation
Unit testing
System integration
Collaboration and communication
Correct Answer : Collaboration and communication
Question : Which language is commonly used for writing executable specifications in BDD?
Java
Python
C#
Gherkin
Correct Answer : Gherkin
Question : What is the role of a "Feature" in a Gherkin file within a BDD framework?
A code snippet
A scenario outline
A high-level description of functionality
A data table
Correct Answer : A high-level description of functionality
Question : Which BDD tool is commonly associated with Java projects for implementing Gherkin scenarios?
Cucumber
Behave
SpecFlow
JBehave
Correct Answer : Cucumber
Question : What is the purpose of the "Given-When-Then" structure in Gherkin syntax?
Representing variables
Organizing test steps
Defining feature files
Identifying code comments
Correct Answer : Organizing test steps
Question : Which section of a Gherkin scenario outlines the initial context or preconditions?
Given
When
Then
And
Correct Answer : Given
Question : In BDD, what is the role of a "Step Definition" file?
Defining feature files
Executing scenarios
Writing Gherkin syntax
Mapping Gherkin steps to code implementations
Correct Answer : Mapping Gherkin steps to code implementations
Question : Which of the following is a benefit of using BDD frameworks?
Faster code compilation
Improved code coverage
Enhanced collaboration between technical and non-technical team members
Reduced execution time of test cases
Correct Answer : Enhanced collaboration between technical and non-technical team members
Question : What is the primary purpose of the "Background" keyword in Gherkin scenarios?
Executing steps before each scenario
Defining feature file properties
Setting the background color of the scenario
Providing additional information about a step
Correct Answer : Executing steps before each scenario
Question : Which BDD framework is associated with the .NET ecosystem and supports Gherkin syntax?
Cucumber
SpecFlow
Behave
JBehave
Correct Answer : SpecFlow
Question : What does the acronym "BDD" stand for in the context of software development?
Binary Data Development
Behavior-Driven Development
Backward Dependency Declaration
Base Data Design
Correct Answer : Behavior-Driven Development
Question : What is the purpose of the "Scenario Outline" keyword in Gherkin?
Defining a high-level scenario
Creating a template for similar scenarios with different inputs
Adding comments to scenarios
Specifying scenario tags
Correct Answer : Creating a template for similar scenarios with different inputs
Question : Which BDD framework is commonly used with Python projects for implementing Gherkin scenarios?
Cucumber
Behave
SpecFlow
JBehave
Correct Answer : Behave
Question : In BDD, what is the purpose of the "Scenario" keyword in Gherkin?
Defining a feature file
Identifying the start of a scenario
Creating a scenario outline
Organizing feature files
Correct Answer : Identifying the start of a scenario
Question : Which section of a Gherkin scenario outlines the expected outcomes or results?
Given
When
Then
And
Correct Answer : Then
Question : What is the purpose of the "Doc Strings" in Gherkin scenarios?
Embedding documentation within feature files
Providing a description for steps
Including multiline string values in steps
Creating a detailed specification for a feature
Correct Answer : Including multiline string values in steps
Question : Which BDD framework is commonly associated with JavaScript projects for implementing Gherkin scenarios?
Cucumber
Behave
SpecFlow
JBehave
Correct Answer : Cucumber
Question : What is the purpose of the "Examples" section in a Gherkin scenario outline?
Listing examples of feature files
Providing additional information about a step
Enumerating various test cases with different input values
Identifying scenarios with the same outline
Correct Answer : Enumerating various test cases with different input values
Question : Which keyword is used to tag scenarios in Gherkin?
Tag
ScenarioTag
@Tag
#Tag
Correct Answer : @Tag
Question : What is the primary goal of BDD frameworks regarding testing scenarios?
Identifying bugs in the code
Executing test cases faster
Ensuring complete test coverage
Improving communication between teams and stakeholders
Correct Answer : Improving communication between teams and stakeholders
Question : What is the purpose of the "Background" keyword in Cucumber scenarios?
Identifying the start of a scenario
Executing steps before each scenario
Creating a template for similar scenarios
Specifying scenario tags
Correct Answer : Executing steps before each scenario
Question : Which BDD framework uses the concept of "Given-When-Then" in its syntax?
JBehave
Behave
Cucumber
SpecFlow
Correct Answer : Cucumber
Question : In BDD, what is the purpose of the "Rule" annotation in JBehave?
Identifying the start of a scenario
Defining a feature file
Organizing test stories
Creating a template for scenarios
Correct Answer : Organizing test stories
Question : What is the primary advantage of using BDD frameworks for test automation?
Faster execution of test cases
Improved readability of test scenarios
Reduced development time
Better handling of exceptions
Correct Answer : Improved readability of test scenarios
Question : What is the purpose of the "GivenStories" keyword in JBehave scenarios?
Executing steps before each scenario
Including additional documentation
Associating external stories with the current scenario
Organizing feature files
Correct Answer : Associating external stories with the current scenario
Question : Which BDD framework is primarily associated with the JVM (Java Virtual Machine) ecosystem?
Behave
Cucumber
SpecFlow
JBehave
Correct Answer : JBehave
Question : In BDD, what is the purpose of the "Background" section in a SpecFlow feature file?
Defining feature file properties
Executing steps before each scenario
Creating a template for scenarios
Providing additional information about a step
Correct Answer : Executing steps before each scenario
Question : Which keyword is used to tag features in Gherkin scenarios?
FeatureTag
@Feature
#Feature
Tag
Correct Answer : @Feature
Question : What is the purpose of the "Scenario Template" in a Gherkin scenario outline?
Executing steps before each scenario
Creating a template for similar scenarios
Identifying scenarios with the same outline
Listing examples of feature files
Correct Answer : Creating a template for similar scenarios
Question : Which BDD framework allows developers to write executable specifications in plain text?
JBehave
SpecFlow
Behave
Cucumber
Correct Answer : Cucumber
Question : What is the role of the "Scenario Context" in BDD frameworks?
Storing and sharing data between steps
Defining the scenario title
Organizing feature files
Controlling the order of execution
Correct Answer : Storing and sharing data between steps
Question : Which BDD framework supports natural language descriptions and uses the "Given-When-Then" structure?
JBehave
Cucumber
Behave
SpecFlow
Correct Answer : JBehave
Question : In BDD, what is the purpose of the "Background" section in a Behave feature file?
Executing steps before each scenario
Defining feature file properties
Organizing test stories
Creating a template for scenarios
Correct Answer : Executing steps before each scenario
Question : What is the primary advantage of using tags in BDD scenarios?
Improved test execution speed
Better organization and categorization of scenarios
Enhanced readability of feature files
Automatic generation of documentation
Correct Answer : Better organization and categorization of scenarios
Question : Which BDD framework uses the concept of "Scenarios" and "Features" in its syntax?
SpecFlow
Behave
JBehave
Cucumber
Correct Answer : SpecFlow
Question : What is the purpose of the "Background" keyword in SpecFlow scenarios?
Executing steps before each scenario
Creating a template for similar scenarios
Defining feature file properties
Organizing test stories
Correct Answer : Executing steps before each scenario
Question : Which BDD framework is often used for testing applications built with the Ruby on Rails framework?
Cucumber
Behave
SpecFlow
JBehave
Correct Answer : Cucumber
Question : In BDD, what is the purpose of the "Step Definition" in the context of Cucumber?
Executing steps before each scenario
Mapping Gherkin steps to code implementations
Defining feature file properties
Creating a template for scenarios
Correct Answer : Mapping Gherkin steps to code implementations
Question : What does the "Scenario Outline" help achieve in BDD frameworks?
Executing steps before each scenario
Creating a template for similar scenarios with different input values
Defining feature file properties
Organizing test stories
Correct Answer : Creating a template for similar scenarios with different input values
RestAssured API
Question : What does the acronym "REST" stand for?
Remote Execution of Stateful Transactions
Representational State Transfer
Resourceful Endpoint Service Technology
Reliable Stateful Transactions
Correct Answer :Representational State Transfer
Question : Which HTTP method is typically used for retrieving a resource in a RESTful API?
POST
GET
PUT
DELETE
Correct Answer :GET
Question : In REST, what does the term "resource" refer to?
A representation of data
An API endpoint
A database table
A programming language
Correct Answer :A representation of data
Question : Which status code indicates a successful HTTP GET request in REST?
200 OK
201 Created
404 Not Found
500 Internal Server Error
Correct Answer :200 OK
Question : What is the primary purpose of the "Content-Type" header in an HTTP request or response?
Specify the type of authentication
Define the character encoding
Indicate the type of data being sent or received
Determine the cache control settings
Correct Answer :Indicate the type of data being sent or received
Question : In RESTful APIs, what is the purpose of the "URI" (Uniform Resource Identifier)?
To define the programming language used
To identify resources and their location
To specify the authentication method
To handle error responses
Correct Answer :To identify resources and their location
Question : Which HTTP method is typically used for creating a new resource in a RESTful API?
POST
GET
PUT
DELETE
Correct Answer :POST
Question : What does the term "idempotent" mean in the context of RESTful APIs?
The ability to create multiple resources with the same identifier
The ability to perform an operation multiple times with the same result as if it were done once
The requirement for strong authentication
The process of handling errors gracefully
Correct Answer :The ability to perform an operation multiple times with the same result as if it were done once
Question : Which HTTP status code is commonly used for resource not found in a RESTful API?
200 OK
201 Created
404 Not Found
500 Internal Server Error
Correct Answer :404 Not Found
Question : What is the purpose of the "OPTIONS" HTTP method in RESTful APIs?
Retrieve resource data
Update a resource
Retrieve metadata information about the resource
Delete a resource
Correct Answer :Retrieve metadata information about the resource
Question : Which authentication method is commonly used in RESTful APIs for secure communication?
OAuth
Basic Authentication
Token Authentication
API Key Authentication
Correct Answer :OAuth
Question : What does HATEOAS stand for in the context of REST architecture?
Hypermedia As The Engine Of Application State
Highly Accessible Transfer Environment for Object Serialization
Hypertext Application Transfer Endpoint Architecture Specification
Heterogeneous Architecture for Transaction Execution Over Asynchronous Systems
Correct Answer :Hypermedia As The Engine Of Application State
Question : Which HTTP method is used to update a resource in a RESTful API?
POST
GET
PUT
PATCH
Correct Answer :PUT
Question : What is the primary purpose of the "Accept" header in an HTTP request?
To indicate the content type of the request
To specify the response format the client can accept
To define the character encoding
To provide authentication credentials
Correct Answer :To specify the response format the client can accept
Question : What is the significance of the "statelessness" principle in RESTful architecture?
Every request from a client contains all the information needed to understand and process the request
The server must store the state of each client to handle subsequent requests
Clients are required to maintain the state of their interactions with the server
Servers must remember the state of each resource to handle requests efficiently
Correct Answer :Every request from a client contains all the information needed to understand and process the request
Question : Which HTTP method is used to partially update a resource in a RESTful API?
POST
GET
PUT
PATCH
Correct Answer :PATCH
Question : What is the purpose of the "ETag" header in HTTP responses?
To specify the encoding of the response
To provide caching information
To indicate the type of authentication used
To define the character set of the response
Correct Answer :To provide caching information
Question : In REST, what does the term "Uniform Interface" refer to?
A standardized way to authenticate requests
A set of conventions that, when applied to resources, results in a uniform and predictable way to interact with those resources
A specific programming language used for API development
A mechanism for encrypting data during transmission
Correct Answer :A set of conventions that, when applied to resources, results in a uniform and predictable way to interact with those resources
Question : Which status code indicates a client error in a RESTful API, typically due to malformed requests?
200 OK
201 Created
400 Bad Request
404 Not Found
Correct Answer :400 Bad Request
Question : What is the purpose of the "Cross-Origin Resource Sharing" (CORS) mechanism in the context of RESTful APIs?
To prevent the use of API resources by unauthorized clients
To enable or restrict access to resources based on the origin of the requesting client
To encrypt data transmitted between the client and server
To define the format of the resource representation
Correct Answer :To enable or restrict access to resources based on the origin of the requesting client
Question : What is REST Assured primarily used for in Java?
Database operations
Front-end development
API automation testing
File manipulation
Correct Answer :API automation testing
Question : Which HTTP method is commonly used with REST Assured to perform a GET request?
post()
get()
put()
delete()
Correct Answer :get()
Question : In REST Assured, what is the purpose of the given(), when(), and then() methods in the testing flow?
Defining request parameters, making the request, and validating the response
Handling exceptions, logging, and printing output
Initializing variables, running tests, and generating reports
Creating test data, executing test cases, and cleaning up resources
Correct Answer :Defining request parameters, making the request, and validating the response
Question : Which of the following is used to set the base URI for REST Assured tests?
base()
baseUri()
setBaseURI()
setBase()
Correct Answer :baseUri()
Question : How do you specify the query parameters in a REST Assured request?
Using the queryParams() method
Appending them to the URL
Using the queryParam() method
Using the params() method
Correct Answer :Using the queryParam() method
Question : What is the purpose of the extract() method in REST Assured?
Extracting data from the request body
Extracting data from the response body
Extracting data from the headers
Extracting data from the URL
Correct Answer :Extracting data from the response body
Question : Which method is used to send a POST request with JSON payload in REST Assured?
post()
sendPost()
postJSON()
sendJSON()
Correct Answer :post()
Question : How do you validate a JSON response using REST Assured?
Using validate()
Using assert()
Using check()
Using verify()
Correct Answer :Using validate()
Question : What is the purpose of the statusCode method in REST Assured?
Setting the HTTP status code for a request
Extracting the HTTP status code from a response
Verifying the expected HTTP status code
Ignoring the HTTP status code
Correct Answer :Verifying the expected HTTP status code
Question : Which method is used to send a DELETE request in REST Assured?
delete()
sendDelete()
remove()
sendRemove()
Correct Answer :delete()
Question : How do you handle authentication in REST Assured for an API that requires a token?
Using the auth() method
Appending the token to the URL
Using the header() method
Using the oauth() method
Correct Answer :Using the header() method
Question : What is the purpose of the contentType() method in REST Assured?
Setting the character encoding
Specifying the expected response content type
Defining the request body content type
Configuring the request timeout
Correct Answer :Defining the request body content type
Question : How do you perform path parameter substitution in REST Assured?
Using the pathParam() method
Appending them to the URL
Using the param() method
Using the setPathParam() method
Correct Answer :Using the pathParam() method
Question : Which method is used to set a request header in REST Assured?
setHeader()
header()
addHeader()
requestHeader()
Correct Answer :header()
Question : What is the purpose of the log() method in REST Assured?
Logging request details
Logging response details
Logging both request and response details
Controlling log levels
Correct Answer :Logging both request and response details
Question : Which method is used to perform assertions on the response body in REST Assured?
assertThat()
verifyThat()
checkThat()
expectThat()
Correct Answer :assertThat()
Question : What does the hasItems() method do in REST Assured?
Checks if the response contains specific items
Adds items to the request
Validates the HTTP status code
Sets the base URI
Correct Answer :Checks if the response contains specific items
Question : How do you perform content verification in REST Assured for a response containing JSON data?
Using content().json()
Using content().verifyJson()
Using check().jsonContent()
Using verify().json()
Correct Answer :Using content().json()
Question : What is the purpose of the relaxedHTTPSValidation() method in REST Assured?
Enabling strict HTTPS validation
Disabling HTTPS validation
Relaxed validation for HTTPS certificates
Specifying a custom SSL context
Correct Answer :Relaxed validation for HTTPS certificates
Question : Which method is used to set the base path for REST Assured tests?
basePath()
setPath()
withPath()
baseURI()
Correct Answer :basePath()
Question : What is the purpose of the formParam() method in REST Assured?
Sending data in JSON format
Setting form parameters in a request
Verifying form fields in the response
Generating form-based authentication tokens
Correct Answer :Setting form parameters in a request
Question : How do you perform response time validation in REST Assured?
Using check().responseTime()
Using assertThat().responseTime()
Using validate().responseTime()
Using verify().responseTime()
Correct Answer :Using validate().responseTime()
Question : What is the purpose of the rootPath() method in REST Assured?
Setting the base path for requests
Defining the root path for JSON responses
Configuring the root directory for the project
Setting the context root for servlets
Correct Answer :Defining the root path for JSON responses
Question : Which method is used to perform XPath-based validation on XML responses in REST Assured?
assertThat().xmlPath()
validate().xpath()
check().xml()
verify().xpath()
Correct Answer :validate().xpath()
Question : What is the purpose of the with() method in REST Assured?
Configuring request parameters
Handling exceptions
Setting authentication details
Initializing test data
Correct Answer :Configuring request parameters
Question : Which method is used to perform assertions on cookies in REST Assured?
assertThat().cookie()
verify().cookies()
check().cookie()
expect().cookie()
Correct Answer :assertThat().cookie()
Question : How do you perform response body content validation in REST Assured for XML data?
Using content().verifyXml()
Using assertThat().xml()
Using check().xmlContent()
Using verify().content().xml()
Correct Answer :Using assertThat().xml()
Question : What is the purpose of the urlEncodingEnabled() method in REST Assured?
Enabling URL encoding for request parameters
Disabling URL encoding for request parameters
Configuring the URL encoding format
Setting the default encoding for URLs
Correct Answer :Disabling URL encoding for request parameters
Question : Which method is used to perform response header validation in REST Assured?
assertThat().header()
verify().headers()
check().responseHeader()
expect().header()
Correct Answer :assertThat().header()
Question : What is the purpose of the redirects() method in REST Assured?
Configuring the number of allowed redirects
Disabling HTTP redirects
Configuring the redirection strategy
Setting the URL for redirection
Correct Answer :Configuring the number of allowed redirects
JavaScript MCQ
Question : What is JavaScript primarily used for?
Styling web pages
Server-side scripting
Enhancing user interfaces in web browsers
Database management
Correct Answer : Enhancing user interfaces in web browsers
Question : Which keyword is used to declare a variable in JavaScript?
v
var
variable
int
Correct Answer : var
Question : What will be the result of the following expression: 3 + '3'?
6
'33'
33
Error
Correct Answer : '33'
Question : Which of the following is not a data type in JavaScript?
String
Boolean
Float
Character
Correct Answer : Character
Question : What does the === operator do in JavaScript?
Assignment
Equality (strict comparison)
Inequality
Type coercion
Correct Answer : Equality (strict comparison)
Question : Which function is used to print output in the console in JavaScript?
print()
log()
display()
console()
Correct Answer : log()
Question : What is the purpose of the querySelector method in JavaScript?
Selects the first element that matches a specified CSS selector
Changes the document's URL
Adds a new HTML element
Converts a string to a number
Correct Answer : Selects the first element that matches a specified CSS selector
Question : Which of the following is a loop structure in JavaScript?
repeat
for/in
sequence
until
Correct Answer : for/in
Question : What does the this keyword refer to in JavaScript?
The current file
The calling function
The global object
The previous variable
Correct Answer : The global object
Question : Which event is triggered when a user clicks on an HTML element in JavaScript?
onhover
onsubmit
onclick
onkeydown
Correct Answer : onclick
Question : What is the purpose of the localStorage object in JavaScript?
Storing session-specific data
Storing data locally in the browser
Managing cookies
Accessing the server's file system
Correct Answer : Storing data locally in the browser
Question : Which keyword is used to prevent the execution of code in JavaScript?
prevent
stop
break
debugger
Correct Answer : debugger
Question : What is the result of the following code snippet: console.log(typeof (5 + '5'))?
number
string
NaN
undefined
Correct Answer : string
Question : What is the purpose of the JSON.stringify() method in JavaScript?
Parsing JSON data
Converting a JavaScript object to a JSON string
Retrieving data from an API
Creating a JSON object
Correct Answer : Converting a JavaScript object to a JSON string
Question : Which function is used to create a new element in the DOM in JavaScript?
createElement()
appendChild()
newElement()
addElement()
Correct Answer : createElement()
Question : What is the purpose of the Promise object in JavaScript?
To handle synchronous operations
To represent a value that might be available now, later, or never
To handle errors in asynchronous code
To create anonymous functions
Correct Answer : To represent a value that might be available now, later, or never
Question : What does the typeof operator return for null in JavaScript?
null
object
undefined
number
Correct Answer : object
Question : Which built-in object is used to handle errors in JavaScript?
Error
Exception
ErrorHandler
TryCatch
Correct Answer : Error
Question : What is the purpose of the splice() method in JavaScript?
To remove elements from an array
To add elements to the beginning of an array
To concatenate two arrays
To reverse the order of elements in an array
Correct Answer : To remove elements from an array
Question : Which keyword is used to declare a constant variable in JavaScript?
let
constant
const
var
Correct Answer : const
Question : What is the purpose of the addEventListener method in JavaScript?
To create event listeners for HTML elements
To add attributes to HTML elements
To create new elements in the DOM
To define functions in JavaScript
Correct Answer : To create event listeners for HTML elements
Question : Which of the following statements is true about the 'let' keyword in JavaScript?
It declares a variable with block scope
It declares a variable with function scope
It declares a constant variable
It is used to define a loop
Correct Answer : It declares a variable with block scope
Question : What does the isNaN() function in JavaScript do?
Checks if a value is not a number
Converts a value to a number
Checks if a value is negative
Retrieves the index of an array element
Correct Answer : Checks if a value is not a number
Question : Which of the following is used to iterate over the values of an iterable object in JavaScript?
for loop
forEach loop
while loop
do-while loop
Correct Answer : forEach loop
Question : What does the 'async' keyword do in a function declaration in JavaScript?
Declares a function as asynchronous
Declares a function as anonymous
Defines a function as an arrow function
Indicates a function with a return value
Correct Answer : Declares a function as asynchronous
Question : Which method is used to remove the last element from an array in JavaScript?
pop()
shift()
removeLast()
deleteLast()
Correct Answer : pop()
Question : What is the purpose of the 'bind()' method in JavaScript?
To bind HTML elements to a JavaScript function
To concatenate strings
To bind the value of 'this' in a function
To create a new array
Correct Answer : To bind the value of 'this' in a function
Question : What does the localStorage.removeItem() method do in JavaScript?
Adds a new item to localStorage
Updates an existing item in localStorage
Removes an item from localStorage
Clears all items from localStorage
Correct Answer : Removes an item from localStorage
Question : Which JavaScript method is used to join elements of an array into a string?
concat()
join()
merge()
combine()
Correct Answer : join()
Question : What does the 'arguments' object in a JavaScript function represent?
All parameters passed to the function
The function's return value
The function's local variables
The number of times the function is called
Correct Answer : All parameters passed to the function
Question : Which of the following is true about the 'map()' method in JavaScript?
It modifies the original array
It creates a new array by applying a function to each element
It removes elements from an array
It returns a boolean value
Correct Answer : It creates a new array by applying a function to each element
Question : What is the purpose of the 'typeof' operator in JavaScript?
To check if a variable is defined
To determine the type of a variable
To convert a string to a number
To create a new variable
Correct Answer : To determine the type of a variable
Question : In JavaScript, how do you create a new object using the Object constructor?
var obj = Object.new();
var obj = new Object();
var obj = create Object();
var obj = {}
Correct Answer : var obj = new Object();
Question : What is the purpose of the 'querySelectorAll' method in JavaScript?
Selects the first element that matches a specified CSS selector
Selects all elements that match a specified CSS selector
Removes all elements from the DOM
Adds a new HTML element
Correct Answer : Selects all elements that match a specified CSS selector
Question : Which JavaScript function is used to parse a JSON string?
parseJSON()
stringify()
JSON.parse()
JSON.stringify()
Correct Answer : JSON.parse()
Question : What is the purpose of the 'Object.keys()' method in JavaScript?
Returns an array of an object's enumerable property names
Returns an array of an object's values
Removes all properties from an object
Adds a new property to an object
Correct Answer : Returns an array of an object's enumerable property names
Question : Which statement is used to exit a loop prematurely in JavaScript?
stop
exit
break
end
Correct Answer : break
Question : What is the purpose of the 'Array.isArray()' method in JavaScript?
Checks if an array is empty
Checks if a variable is an array
Adds elements to an array
Concatenates two arrays
Correct Answer : Checks if a variable is an array
Question : Which of the following is not a valid way to declare a function in JavaScript?
function myFunction(){}
const myFunction = function(){}
var myFunction = () => {}
myFunction = function(){}
Correct Answer : myFunction = function(){}
Question : What is the purpose of the 'Array.reduce()' method in JavaScript?
Adds elements to the end of an array
Removes the first element from an array
Applies a function against an accumulator and each element in the array
Reverses the order of elements in an array
Correct Answer : Applies a function against an accumulator and each element in the array
Operating system interview question
Question : What is the main function of an operating system?
Manage hardware resources
Run applications
Provide a user interface
All of the above
Correct Answer :All of the above
Question : Which of the following is not a main function of the operating system?
Process management
File management
Web browsing
Memory management
Correct Answer :Web browsing
Question : What is the purpose of a file system in an operating system?
Manage system processes
Organize and store data on storage devices
Control network traffic
Allocate CPU resources
Correct Answer :Organize and store data on storage devices
Question : Which scheduling algorithm provides the best average response time for a set of processes?
First-Come, First-Served (FCFS)
Shortest Job Next (SJN)
Round Robin (RR)
Priority Scheduling
Correct Answer :Shortest Job Next (SJN)
Question : What is a deadlock in the context of an operating system?
A process terminates unexpectedly
A process is waiting for a resource held by another process
Two or more processes are unable to proceed because each is waiting for the other
A process consumes excessive CPU time
Correct Answer :Two or more processes are unable to proceed because each is waiting for the other
Question : Which memory management scheme allows programs to be larger than the physical memory?
Paging
Segmentation
Virtual memory
Cache memory
Correct Answer :Virtual memory
Question : What is the role of the Kernel in an operating system?
Manage user interfaces
Provide security to the system
Act as an intermediary between hardware and software
Execute user applications
Correct Answer :Act as an intermediary between hardware and software
Question : In a multiprogramming environment, what is the primary purpose of the job scheduler?
Manage input/output devices
Allocate CPU to processes
Manage system resources
Execute system commands
Correct Answer :Allocate CPU to processes
Question : What is the purpose of the "swap space" in the context of virtual memory?
Store temporary files
Hold the operating system kernel
Provide additional RAM when physical memory is full
Manage file permissions
Correct Answer :Provide additional RAM when physical memory is full
Question : What is the function of an Interrupt Handler in an operating system?
Manage system calls
Handle errors in the file system
Respond to hardware or software-generated interrupts
Monitor network traffic
Correct Answer :Respond to hardware or software-generated interrupts
Question : What is the purpose of the 'page fault' in virtual memory systems?
A page is removed from the memory
A page is successfully fetched from the disk
A required page is not in memory and must be brought in
The page table is corrupted
Correct Answer :A required page is not in memory and must be brought in
Question : Which of the following is an example of a real-time operating system?
Windows
Linux
Android
QNX
Correct Answer :QNX
Question : What is the purpose of the 'fork' system call in Unix-like operating systems?
Create a new process
Execute a new program
Terminate a process
Synchronize processes
Correct Answer :Create a new process
Question : Which of the following is an example of a preemptive scheduling algorithm?
First-Come, First-Served (FCFS)
Round Robin (RR)
Shortest Job Next (SJN)
Priority Scheduling
Correct Answer :Round Robin (RR)
Question : What is the role of the Secondary Storage in an operating system?
Store temporary data during program execution
Provide fast access to frequently used data
Store data permanently even when the power is off
Manage network connections
Correct Answer :Store data permanently even when the power is off
Question : Which memory management technique is used to overcome external fragmentation?
Paging
Segmentation
Swapping
Fragmentation cannot be overcome
Correct Answer :Paging
Question : What is the purpose of the 'shell' in an operating system?
Manage system resources
Provide a user interface
Handle hardware interrupts
Execute system calls
Correct Answer :Provide a user interface
Question : What is a process in the context of an operating system?
A program in execution
A file system structure
A system call
A hardware component
Correct Answer :A program in execution
Question : Which file system is commonly used in Linux operating systems?
NTFS
FAT32
ext4
HFS+
Correct Answer :ext4
Question : What is the purpose of the 'DMA Controller' in computer systems?
Manage disk space
Facilitate communication between the CPU and I/O devices
Handle memory allocation
Execute arithmetic operations
Correct Answer :Facilitate communication between the CPU and I/O devices
Question : What is the purpose of the 'chroot' command in Unix-like operating systems?
Change root directory for a process
Change system clock
Change user password
Change shell prompt
Correct Answer :Change root directory for a process
Question : Which scheduling algorithm uses a priority value associated with each process for CPU allocation?
First-Come, First-Served (FCFS)
Round Robin (RR)
Priority Scheduling
Shortest Job Next (SJN)
Correct Answer :Priority Scheduling
Question : In the context of memory management, what is thrashing?
Excessive page faults
Rapidly switching between processes
Fragmentation of memory
Allocation of too much swap space
Correct Answer :Excessive page faults
Question : Which of the following is an example of a real-time operating system?
Windows
Linux
Android
VxWorks
Correct Answer :VxWorks
Question : What is the primary purpose of the 'fork' system call in Unix-like operating systems?
Terminate a process
Create a new process
Allocate memory to a process
Change process priority
Correct Answer :Create a new process
Question : Which file system is commonly used in Windows operating systems?
ext4
NTFS
HFS+
FAT32
Correct Answer :NTFS
Question : What is the purpose of the 'nice' command in Unix-like operating systems?
Adjust process priority
Display system information
Rename files
Create symbolic links
Correct Answer :Adjust process priority
Question : What is the role of the 'swap space' in the virtual memory system?
Store temporary files
Hold the operating system kernel
Provide additional RAM when physical memory is full
Manage file permissions
Correct Answer :Provide additional RAM when physical memory is full
Question : Which process scheduling algorithm allows a process to occupy the CPU until it completes execution?
Round Robin (RR)
Priority Scheduling
First-Come, First-Served (FCFS)
Shortest Job Next (SJN)
Correct Answer :First-Come, First-Served (FCFS)
Question : What is a 'Semaphore' in the context of operating systems?
A signaling mechanism for process synchronization
A type of memory allocation
A system clock component
A file system structure
Correct Answer :A signaling mechanism for process synchronization
Question : In the context of file systems, what does RAID stand for?
Random Access In-memory Disk
Redundant Array of Independent Disks
Rapid Access for Input Data
Read And Insert Data
Correct Answer :Redundant Array of Independent Disks
Question : Which process scheduling algorithm aims to reduce the waiting time for processes with higher priority?
Shortest Job Next (SJN)
Priority Scheduling
Round Robin (RR)
Multilevel Queue Scheduling
Correct Answer :Priority Scheduling
Question : What is the purpose of the 'lsblk' command in Linux?
List block devices
List system logs
List running processes
List file attributes
Correct Answer :List block devices
Question : Which scheduling algorithm uses multiple queues with different priorities for CPU allocation?
Round Robin (RR)
Priority Scheduling
Multilevel Queue Scheduling
Shortest Job Next (SJN)
Correct Answer :Multilevel Queue Scheduling
Question : What is the purpose of the 'mount' command in Linux?
Create a new directory
Display disk usage
Attach a filesystem to the directory tree
Change file permissions
Correct Answer :Attach a filesystem to the directory tree
Question : Which process scheduling algorithm employs time slices for each process?
Priority Scheduling
Shortest Job Next (SJN)
Round Robin (RR)
First-Come, First-Served (FCFS)
Correct Answer :Round Robin (RR)
Question : What is the function of the 'swapoff' command in Linux?
Enable swap space
Disable swap space
Display swap space information
Create a swap partition
Correct Answer :Disable swap space
Question : In the context of operating systems, what is a 'context switch'?
Changing the system configuration
Switching between different file systems
Switching between processes
Changing user passwords
Correct Answer :Switching between processes
Question : What is the purpose of the 'chown' command in Unix-like operating systems?
Change file ownership
Change file permissions
Change file content
Change file attributes
Correct Answer :Change file ownership
Question : Which component of the operating system manages the execution of processes?
Kernel
Shell
Scheduler
File System
Correct Answer :Scheduler
Unix command MCQ
Question : What command is used to display the current directory?
ls
cd
pwd
dir
Correct Answer : pwd
Question : Which command is used to create a new directory?
mkdir
touch
newdir
mkd
Correct Answer : mkdir
Question : How do you list files in a long format, including hidden files?
ls -l
ls -a
ls -h
ls -lh
Correct Answer : ls -lh
Question : To navigate to your home directory, which command would you use?
home
cd ~
cd /home
go home
Correct Answer : cd ~
Question : What command is used to remove a file?
delete
rm
erase
del
Correct Answer : rm
Question : Which command is used to display the last 10 lines of a file?
cat
tail
head
more
Correct Answer : tail
Question : What does the 'chmod +x' command do?
Adds execute permission
Adds read permission
Adds write permission
Removes execute permission
Correct Answer : Adds execute permission
Question : To search for a specific text in a file, which command is used?
find
grep
search
locate
Correct Answer : grep
Question : Which command is used to copy files or directories in Unix?
cp
mv
copy
duplicate
Correct Answer : cp
Question : To see the contents of a file in real-time as it grows, which command is used?
tail -f
cat -r
more -f
watch
Correct Answer : tail -f
Question : What does the 'ps' command do?
Displays current processes
Pauses a process
Resumes a process
Stops a process
Correct Answer : Displays current processes
Question : Which command is used to find the total disk space used by a directory and its subdirectories?
du
df
diskusage
space
Correct Answer : du
Question : What does the command 'echo $SHELL' display?
Prints the system date
Displays the current shell
Echoes the contents of a file
Prints the environment variables
Correct Answer : Displays the current shell
Question : To terminate a process forcefully, which command is used?
kill
terminate
end
stop
Correct Answer : kill
Question : Which command is used to display the manual pages for a command?
info
man
help
manual
Correct Answer : man
Question : What does the 'df' command display?
Disk format
Directory files
Disk free space
Data files
Correct Answer : Disk free space
Question : To move up one directory level, which command is used?
cd ..
cd /
cd up
cd parent
Correct Answer : cd ..
Question : What is the purpose of the 'tar' command in Unix?
Compress files
Copy files
Archive files
Delete files
Correct Answer : Archive files
Question : Which command is used to display the calendar for a specific month?
cal
calendar
datecal
month
Correct Answer : cal
Question : To see the currently logged-in users, which command is used?
users
who
logged
online
Correct Answer : who
Question : What does the command 'mv file1 file2' do?
Copies file1 to file2
Renames file1 to file2
Moves file1 to directory file2
Appends file1 to file2
Correct Answer : Renames file1 to file2
Question : To display the current date and time, which command is used?
time
date
clock
datetime
Correct Answer : date
Question : What is the purpose of the 'history' command in Unix?
Displays system events
Shows recent commands entered
Lists user login history
Views file modification history
Correct Answer : Shows recent commands entered
Question : Which command is used to remove a directory and its contents recursively?
rmdir
delete
rmdir -r
rm -r
Correct Answer : rm -r
Question : To find a file by its name, what command is used?
locate
search
find
grep
Correct Answer : find
Question : What does the 'chmod 755 file' command do?
Adds execute permission to the owner
Adds read and write permissions to the owner
Sets read, write, and execute permissions for everyone
Removes all permissions
Correct Answer : Sets read, write, and execute permissions for everyone
Question : Which command is used to display the top processes consuming system resources?
top
ps -top
taskmgr
sysstat
Correct Answer : top
Question : To count the number of lines in a file, which command is used?
linecount
wc -l
countlines
lines
Correct Answer : wc -l
Question : What does the 'echo $PATH' command display?
Current working directory
List of environment variables
Print system path
Print user's home directory
Correct Answer : Print system path
Question : Which command is used to compress a file or directory in Unix?
compress
zip
gzip
tar -c
Correct Answer : gzip
Question : To open a text file for editing in the default text editor, which command is used?
open
edit
nano
vi
Correct Answer : open
Question : What does the 'uname' command display?
User information
System name
Current shell
File permissions
Correct Answer : System name
Question : To display the size of a file or directory, which command is used?
size
ls -s
du -h
filesize
Correct Answer : du -h
Question : Which command is used to change the ownership of a file or directory?
own
chown
chmod
usermod
Correct Answer : chown
Question : To create an empty file in Unix, which command is used?
touch
newfile
create
mkfile
Correct Answer : touch
Question : What does the 'cut' command do in Unix?
Deletes files
Cuts text from files
Cuts columns from a file
Copies files to a new location
Correct Answer : Cuts columns from a file
Question : Which command is used to view the contents of a compressed file without extracting it?
view
cat
zcat
read
Correct Answer : zcat
Question : To execute a command in the background, what symbol is used at the end of the command?
&
!
^
#
Correct Answer : &
Question : What does the 'df -h' command display?
Disk format in human-readable format
Directory files
Disk free space in human-readable format
Data files in human-readable format
Correct Answer : Disk free space in human-readable format
Question : Which command is used to create a symbolic link in Unix?
link
ln -s
symlink
mklink
Correct Answer : ln -s
Question : To view the contents of a file from the end, which command is used?
cat
more
tail
head
Correct Answer : tail
Question : Which command is used to display the manual pages in a specific section?
man
info
help
whatis
Correct Answer : man
Question : What does the 'grep' command do?
Display disk usage
Search for a pattern in a file
Rename a file
Move a file
Correct Answer : Search for a pattern in a file
Question : To view the system's uptime, which command is used?
uptime
time
sysuptime
systemtime
Correct Answer : uptime
Question : Which command is used to set the password for a user in Unix?
passwd
setpass
password
userpass
Correct Answer : passwd
Question : What does the 'whoami' command display?
Current shell
System name
Current user
User ID
Correct Answer : Current user
Question : To sort the lines of a text file in ascending order, which command is used?
sort
order
arrange
organize
Correct Answer : sort
Question : What is the purpose of the 'env' command in Unix?
Display environment variables
Encrypt files
Evaluate expressions
Edit network settings
Correct Answer : Display environment variables
Question : To check the disk space usage of a file system, which command is used?
space
diskusage
df
checkdisk
Correct Answer : df
Question : Which command is used to suspend a running process in the foreground?
stop
suspend
ctrl+z
pause
Correct Answer : ctrl+z
Question : What does the 'find' command do in Unix?
Search for files and directories
Display file contents
Rename files
Delete files
Correct Answer : Search for files and directories
Question : Which command is used to display the permissions of a file in symbolic notation?
ls -p
chmod -s
ls -l
chmod -l
Correct Answer : ls -l
Question : To create an archive of a directory, which command is used?
archive
compress
tar
zip
Correct Answer : tar
Question : What does the command 'echo $HOME' display?
Current working directory
Home directory of the user
System home directory
User's login name
Correct Answer : Home directory of the user
Question : Which command is used to display the process ID (PIof a running process?
pidof
ps -p
getpid
procid
Correct Answer : pidof
Question : To append the contents of one file to another, which command is used?
cp
cat
append
merge
Correct Answer : cat
Question : What is the purpose of the 'tee' command in Unix?
Display file contents
Redirect output to a file
Create links between files
Display system time
Correct Answer : Redirect output to a file
Question : Which command is used to display the disk space usage of a file or directory in a human-readable format?
du
df -h
diskusage
space -h
Correct Answer : du
Question : To display the first 10 lines of a file, which command is used?
cat
head
tail
more
Correct Answer : head
Question : What does the 'alias' command do in Unix?
Create a new user
Assign a nickname to a command
Delete a file
Rename a directory
Correct Answer : Assign a nickname to a command
Unix commands
Question: ls
Answer: lists your files
Question: ls -l
Answer: lists your files in 'long format', which contains lots of useful information, e.g. the exact size of the file, who owns the file and who has the right to look at it, and when it was last modified.
Question: ls -a
Answer: lists all files, including the ones whose filenames begin in a dot, which you do not always want to see.
Question: touch
Answer: The ‘$ touch’ command creates a file(not directory) and you can simple add an extension such as .txt after it to make it a Text File.
There are many more options, for example to list files by size, by date, recursively etc.
Question: more filename
Answer: shows the first part of a file, just as much as will fit on one screen. Just hit the space bar to see more or q to quit. You can use /pattern to search for a pattern.
Question: emacs filename
Answer: is an editor that lets you create and edit a file. See the emacs page.
Question: mv filename1 filename2
Answer: moves a file (i.e. gives it a different name, or moves it into a different directory
Question: cp filename1 filename2
Answer: copies a file
Question: rm filename
Answer: removes a file. It is wise to use the option rm -i, which will ask you for confirmation before actually deleting anything. You can make this your default by making an alias in your .cshrc file.
Question: diff filename1 filename2
Answer: compares files, and shows where they differ
Question: wc filename
Answer: tells you how many lines, words, and characters there are in a file
Question: chmod options filename
Answer: lets you change the read, write, and execute permissions on your files. The default is that only you can look at them and change them, but you may sometimes want to change these permissions. For example, chmod o+r filename will make the file readable for everyone, and chmod o-r filename will make it unreadable for others again. Note that for someone to be able to actually look at the file the directories it is in need to be at least executable.
1. +w (stands for write and it changes file permissions to write)
2. +r (stands for read and it changes file permissions to read)
3. +x (generally it is used to make a file executable)
e.g. - $ chmod +w file.txt
$ chmod +r file.txt
$ chmod +x file.txt
Question: $ sort file
Answer: As the name suggests the ‘$ sort’ sorts the contents of the file according to the ASCII rules.
Question: $ history
Answer: The ‘$ history’ command is used to get list of previous commands may be obtained by executing the following command. you can also use parameters like !n to re-execute the nth command, !! to executes the most recent command, and !cp this will execute the most recent command that starts with cp.
Question: gzip filename
Answer: compresses files, so that they take up much less space. Usually text files compress to about half their original size, but it depends very much on the size of the file and the nature of the contents. There are other tools for this purpose, too (e.g. compress), but gzip usually gives the highest compression rate. Gzip produces files with the ending '.gz' appended to the original filename.
Question: gunzip filename
Answer: uncompresses files compressed by gzip.
Question: gzcat filename
Answer: lets you look at a gzipped file without actually having to gunzip it (same as gunzip -c).
Question: lpr filename
Answer: print. Use the -P option to specify the printer name if you want to use a printer other than your default printer. For example, if you want to print double-sided, use 'lpr -Pvalkyr-d', or if you're at CSLI, you may want to use 'lpr -Pcord115-d'. See 'help printers' for more information about printers and their locations.
Question: lpq
Answer: check out the printer queue, e.g. to get the number needed for removal, or to see how many other files will be printed before yours will come out
Question: lprm jobnumber
Answer: remove something from the printer queue. You can find the job number by using lpq. Theoretically you also have to specify a printer name, but this isn't necessary as long as you use your default printer in the department.
Question: genscript
Answer: converts plain text files into postscript for printing, and gives you some options for formatting. Consider making an alias like alias ecop 'genscript -2 -r \!* | lpr -h -Pvalkyr' to print two pages on one piece of paper.
Question: dvips filename
Answer: print .dvi files (i.e. files produced by LaTeX). You can use dviselect to print only selected pages. See the LaTeX page for more information about how to save paper when printing drafts.
Question: mkdir dirname
Answer: make a new directory
Question: rmdir
Answer: The ‘$ rmdir’ command deletes any directory we want to delete and you can remember it by its names ‘rmdir’ which stands for ‘remove directory’.
Question: cd dirname
Answer: change directory. You basically 'go' to another directory, and you will see the files in that directory when you do 'ls'. You always start out in your 'home directory', and you can get back there by typing 'cd' without arguments. 'cd ..' will get you one level up from your current position. You don't have to walk along step by step - you can make big leaps or avoid walking around by specifying pathnames.
Question: pwd
Answer: tells you where you currently are.
Question: ff
Answer: find files anywhere on the system. This can be extremely useful if you've forgotten in which directory you put a file, but do remember the name. In fact, if you use ff -p you don't even need the full name, just the beginning. This can also be useful for finding other things on the system, e.g. documentation.
Question: grep string filename(s)
Answer: looks for the string in the files. This can be useful a lot of purposes, e.g. finding the right file among many, figuring out which is the right version of something, and even doing serious corpus work. grep comes in several varieties (grep, egrep, and fgrep) and has a lot of very flexible options.
Question: who
Answer: tells you who's logged on, and where they're coming from. Useful if you're looking for someone who's actually physically in the same building as you, or in some other particular location.
Question: finger username
Answer: gives you lots of information about that user, e.g. when they last read their mail and whether they're logged in. Often people put other practical information, such as phone numbers and addresses, in a file called .plan. This information is also displayed by 'finger'.
Question: last -1 username
Answer: tells you when the user last logged on and off and from where. Without any options, last will give you a list of everyone's logins.
Question: talk username
Answer: lets you have a (typed) conversation with another user
Question: write username
Answer: lets you exchange one-line messages with another user
Question: elm
Answer: lets you send e-mail messages to people around the world (and, of course, read them). It's not the only mailer you can use, but the one we recommend. See the elm page, and find out about the departmental mailing lists (which you can also find in /user/linguistics/helpfile).
Question: whoami
Answer: returns your username. Sounds useless, but isn't. You may need to find out who it is who forgot to log out somewhere, and make sure *you* have logged out.
Question: date
Answer: shows the current date and time.
Question: cal
Answer: shows a calendar of the current month.
Question: man commandname
Answer: shows you the manual page for the command
Question: echo $VARIABLE
Answer: shows the value of an environment variable
popular posts
-
Question: What is WebDriverIO? Answer: WebDriverIO is a Node.js library that provides a WebDriver API implementation for web automation. It ...
-
There are thousands of cryptocurrencies available in addition to Bitcoin. Here are some notable examples: 1. Ethereum (ETH): Ethereum is th...
-
Question : Which command is used to maximize the browser window in WebdriverIO? browser.maximizeWindow() browser.maximize() browser.windowMa...