IT Questions and Answers :)

Sunday, August 25, 2019

How do you delete 4 lines using the "vi" Unix editor?

How do you delete 4 lines using the "vi" Unix editor?

  • y4
  • 4<delete-key>
  • 4x
  • 4dd 

EXPLANATION

I am using putty and vi editor if select 5 lines using mouse and i want to delete those lines how can i do that
Forget the mouse. To remove 5 lines, either:

  • Go to the first line and type d5d (dd deletes one line, d5d deletes 5 lines) ~or~
  • Type Shift-v to enter linewise selection mode, then move the cursor down using j (yes, use h, j, k and l to move left, down, up, right respectively, that's much more efficient than using the arrows) and type d to delete the selection.
Also how can i select the lines from keyboard like in windows i pres shift and move the arrows to select the text. how can i do that in vi
As I said, either use Shift-v to enter linewise selection mode or v to enter characterwise selection mode or Ctrl-v to enter blockwise selection mode. Then move with h, j, k and l.
I suggest spending some time with the VIM Tutor (run vimtutor) to get more familiar with VIM in a very didactic way.

See also

 

Share:

What does DOS stand for?

What does DOS stand for?

  • Direct operating system
  • Disk operating system
  • Direct operation system
  • Drive operating system 
What does DOS stand for?

EXPLANATION

DOS (Disk Operating System)

DOS (Disk Operating System) is an operating system that runs from a hard disk drive. The term can also refer to a particular family of disk operating systems, most commonly MS-DOS (Microsoft Disk Operating System).

An operating system (OS) is the software that controls a computer's hardware and peripheral devices and allows other programs to function. Early computers did not have disk drives but were hard-wired to carry out specific computations. Later, computers were able to store instructions loaded into the computer's memory using punch cards and later magnetic tapes. Computer memory space was limited and when the instructions to control a computer were moved onto a disk drive, such as a floppy disk or internal hard drive, it was considered cutting-edge technology. Today, any modern operating system would be considered a disk operating system.

Disk operating system is also used to describe several very similar command line disk operating systems. PC-DOS (Personal Computer Disk Operating System) was the first widely-installed disk operating system used in personal computers running on Intel 8086 16-bit processors. It was developed for IBM by Microsoft Corporation, which also produced its own almost identical version called MS-DOS. Other computers at the time, such as the Commodore 64, Atari 800, and Apple II, all featured a disk operating system, CBM DOS, Atari DOS, and Apple DOS, respectively. (DOS/360 was an operating system for IBM mainframes which first appeared in 1966, but is unrelated to the 8086-based DOS of the 1980s.

These early operating systems did not multitask, as they were only able to run one program at a time. The command line interface, in which a user has to type in commands, required the user to remember commands to run programs or do other operating system tasks, making it difficult for novices to use. For example, typing the command "cd \directory_name" changed the current working directory to the named directory and typing the command "dir" listed the files in the current directory.

When Microsoft first introduced Windows as a graphical user interface (GUI) for MS-DOS, early users had to type "WIN" at the DOS prompt to launch the Windows program. Windows has since evolved from being a GUI program running under DOS to a full operating system taking over as the default OS, though it was not until Windows XP that consumer versions of Windows stopped relying on the DOS program win.com to bootstrap the Windows kernel.

The last retail version of MS-DOS was MS-DOS 6.22. After this release, MS-DOS was still bundled as part of Windows, but no longer required a separate license. It can still be run under Windows using the Command Prompt program. There is an open source version of DOS called FreeDOS which is based on and compatible with MS-DOS.
Note: The acronym DoS with a lowercase O is short for Denial of Service, a method of attacking a networked computer by sending it an abnormally high number of requests in order to exhaust its resources so that genuine users cannot gain access.

Share:

What does the ECC in ECC memory stand for?

What does the ECC in ECC memory stand for?

  • Error-correcting code
  • Error catching card
  • Electrical code cache
  • Every common courtesy 
What does the ECC in ECC memory stand for?

EXPLANATION

Error-correcting code memory (ECC memory) is a type of computer data storage that can detect and correct the most-common kinds of internal data corruption. ECC memory is used in most computers where data corruption cannot be tolerated under any circumstances, such as for scientific or financial computing.

 


Share:

In programming, what does VBA stand for?

In programming, what does VBA stand for?

  • Visual Basic Arguments
  • Visual Basic for Applications
  • Virtual Bus Applications
  • Virtual Bus Accelerator 
In programming, what does VBA stand for?

EXPLANATION

VBA, which stands for Visual Basic for Applications, is a programming language developed by Microsoft — you know, the company run by the richest man in the world. Excel, along with the other members of Microsoft Office 2003, includes the VBA language (at no extra charge).
Developers: Microsoft
Share:

In DNS, an AAAA record contains:

In DNS, an AAAA record contains:

  • An IPv6 address
  • Nothing; it's not a real record
  • An address-to-name translation (IP to domain name)
  • Domain ownership information 
In DNS, an AAAA record contains:

EXPLANATION

An AAAA record maps a domain name to the IP address (Version 6) of the computer hosting the domain. An AAAA record is used to find the IP address of a computer connected to the internet from a name.
The AAAA record is conceptually similar to the A record, but it allows you to specify the IPv6 address of the server, rather than the IPv4.
AAAA records are less common than A records, however their popularity is rising along with the increased adoption of IPv6 addresses. For example, all the DNSimple name servers are assigned to an IPv6 address and can be queried via either IPv4 or IPv6.
As with the A records, you can use multiple AAAA records for the same domain in order to provide redundancy. Multiple names could point to the same address, in which case each would have its own AAAA record pointing to that same IP address.
The DNS A record is specified by RFC 3596.

AAAA record format

The structure of an AAAA record follows the standard top-level format definition defined RFC 1035. The RDATA section is composed of one single element:
address A 128 bit Internet address representing an IPv6 address
Hosts that have multiple Internet addresses have multiple A records.
The canonical representation is:
AAAA <address>
where <address> is an IPv6 address and looks like 2400:cb00:2049:1::a29f:1804.
In DNSimple, the AAAA record is represented by the following customizable elements:
Name The host name for the record without the domain name. This is generally referred to as “subdomain”. We automatically append the domain name.
TTL The time-to-live in seconds. This is the amount of time the record is allowed to be cached by a resolver.
Address The IPv6 address the AAAA record points to.

Querying AAAA records

You can use dig to determine the AAAA record associated with a domain name. The result is contained in the ANSWER section. It contains the fully-qualified domain name (FQDN), the remaining time-to-live (TTL), and the IP address.
$ dig AAAA ns1.dnsimple.com

; <<>> DiG 9.10.6 <<>> AAAA ns1.dnsimple.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52403
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;ns1.dnsimple.com.  IN AAAA

;; ANSWER SECTION:
ns1.dnsimple.com. 1795 IN AAAA 2400:cb00:2049:1::a29f:1804

;; Query time: 47 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Fri Nov 02 19:20:40 CET 2018
;; MSG SIZE  rcvd: 73

Manage AAAA records

From the DNSimple record editor you can add, remove, and update AAAA records.

 











Share:

What is the simplest CPU scheduling Algorithm?

What is the simplest CPU scheduling Algorithm?

  • FCFS scheduling algorithm
  • Multilevel scheduling algorithm
  • Round robin scheduling algorithm
  • SJF scheduling algorithm 
What is the simplest CPU scheduling Algorithm?

EXPLANATION


First-Come First-Served Scheduling:-

The process which comes first is executed first.
The simplest CPU scheduling algorithm is the first-come, first-served (FCFS) scheduling algorithm. With this scheme, the process that requests the CPU first is allocated the CPU first. The implementation of the FCFS policy is easily managed with a FIFO queue. When a process enters the ready queue, its PCB is linked onto the tail of the queue. When the CPU is free, it is allocated to the process at the head of the queue. The running process is then removed from the queue. The code for FCFS scheduling is simple to write and understand. The average waiting time under the FCFS policy, however, is often quite long.
Share:

What is SAML?

What is SAML?

  • A web programming language
  • A cloud service provider
  • A protocol used in Identity Federation
  • An account database used in early Windows versions

What is SAML?

EXPLANATION

Security Assertion Markup Language (SAML, pronounced SAM-el[1]) is an open standard for exchanging authentication and authorization data between parties, in particular, between an identity provider and a service provider. SAML is an XML-based markup language for security assertions (statements that service providers use to make access-control decisions). SAML is also:

  • A set of XML-based protocol messages
  • A set of protocol message bindings
  • A set of profiles (utilizing all of the above)
The single most important use case that SAML addresses is web browser single sign-on (SSO). Single sign-on is relatively easy to accomplish within a security domain (using cookies, for example) but extending SSO across security domains is more difficult and resulted in the proliferation of non-interoperable proprietary technologies. The SAML Web Browser SSO profile was specified and standardized to promote interoperability.[2] (For comparison, the more recent OpenID Connect protocol[3] is an alternative approach to web browser SSO.)

 

Share:

Popular Posts