Essential Unix Commands and Functions
Commands
Function
Directory/Folder
A term refers to a folder used to organize different files and make locating them easier!
Bash
Bourne Again SHell
ls
lists the current working directory.
ls -F
tells ls to classify the output by adding a marker to file and directory names to indicate what they are:
- / – a trailing / indicates that this is a directory
- @ – indicates a link
- * – indicates an executable
-a
-a stands for ‘show all’ (including hidden files); it forces ls to show us file and directory names that
Python Unit Testing and Data Structures
Another name for unit test in Python?
pyUnit
What is unit testing?
Framework used for testing your code while parallely writing your code and it helps in defining more precisely the intent of the code.
What is the difference between unit test and docstring?
Unit test is a unit testing framework that helps in determining quickly the impact of any modification on the rest of the code. Docstring are used to verify if the docstrings are still relevant to the current version of the code.
Explain what is pdb
Read MoreUnderstanding LAN Hardware and Campus Design Factors
LAN Hardware
Repeaters– Repeaters are the basic unit in networks that connect separate segments. Repeaters take incoming frames, regenerate the preamble, amplify the signals, and send the frame out all other interfaces. Repeaters operate at the physical layer of the OSI model.
Hubs– hubs were introduced to concentrate thinnet and 10BASE-T networks in the wiring closet. Traditional hubs operate on the physical layer of the OSI model and perform the same functions as basic repeaters. The difference
Read MoreCisco Networking Questions and Answers
What are the three true statements about the default of a new switch? (Choose two.)
- All switch ports are assigned to VLAN1.
- All interfaces are set to automatic.
- The flash directory contains the IOS image.
See illustration. The priorities for port spanning-tree are listed beneath each interface. The network administrator enters the command spanning-tree vlan 1 root primary in S4. What are the three port correct results? (Choose two.)
- S1 Gi0 / 1 becomes a root port.
- S4 Gi0 / 1 becomes a root port.
- S2 Gi0
Essential Linux Commands and Functions
Basic Linux commands
| Command | Description | |
|---|---|---|
ls | Lists all files and directories in the present working directory | |
ls -R | Lists files in sub-directories as well | |
ls -a | Lists hidden files as well | |
ls -al | Lists files and directories with detailed information like permissions, size, owner, etc. | |
cd or cd ~ | Navigate to the HOME directory | |
cd .. | Move one level up | |
cd | To change to a particular directory | |
cd / | Move to the root directory | |
cat > filename | Creates a new file | |
cat filename | Displays the file content | |
cat file1 file2 > file3 | Joins |
Scanf belogs to which header file
#include<stdio.H>
int main()
{
/* my 1st program in C */
printf(“Hello, World! \n”);
return0;
}
Let us take a look at the various parts of the above program −
The 1st line of the program #include <stdio.H> is a preprocessor command, which tells a C compiler to include stdio.H file before going to actual compilation.
The next line int main() is the main function where the program execution begins.
The next line /*…*/ will be ignored by the compiler & it has been put to add additional
