Display the Last Part of a File in Linux

Shilpa S
Updated on 01-Jul-2021 14:27:09

21K+ Views

To display the last part of the file, we use the tail command in the Linux system.The tail command is used to display the end of a text file or piped data in the Linux operating system. By default, it displays the last 10 lines of its input to the standard output. It is also complementary of the head command.SyntaxThe general syntax of the tail command is as follow −tail [OPTION]... [FILE]...Brief description of options available in the tail command.Sr.No.Option & Description1-c, --byte = [-]NUMDisplay the last NUM bytes of each file. Or -c +NUM to display starting with byte ... Read More

Display the First Part of a File in Linux

Shilpa S
Updated on 01-Jul-2021 14:23:54

13K+ Views

To display the first part of the file, we use the head command in the Linux system.The head command is used to display the beginning of a text file or piped data. By default, it displays the first ten lines of the specified files. The tail command is also used to display the ending part of the file.SyntaxThe general syntax of the head command is as follow −head [OPTION]... [FILE]...Brief description of options available in the head command.Sr.No.Option & Description1-c, --byte = [-]NUMDisplay the first NUM bytes of each file. With the leading ‘-‘, print all but the last NUM ... Read More

List All Users Currently Logged into the Linux System

Shilpa S
Updated on 01-Jul-2021 14:18:31

4K+ Views

To check information about users who are currently logged into the system, we use the who command in the Linux system.The who command is used to display the users logged into the system. The who command related to the w command that is used to display information about the users currently on the machine and their processes.SyntaxThe general syntax of the who command is as follows −who [OPTION]... [ FILE | ARGUMENT1 ARGUMENT2 ]Brief description of options available in the who command.Sr.No.Option & Description1-a, --allSame as -b -d --login -p -r -t -T -u2-b, --bootDisplay last rebooted time of system3-d, ... Read More

Create Links Between Files in Linux

Shilpa S
Updated on 01-Jul-2021 14:16:18

3K+ Views

Before creating links, we need to understand what is link and how many types of link in the Linux system.LinkLinks are shortcuts to access a file. It is a connection between file name and actual data in the system. We can say that a link is a pointer to a file.Types of linksThere are two types of links in the Linux system.Hard LinksSoft Links or Symbolic linksHard Links -The hard link points to the index node of a file, the data of which is stored on the system and the size of link is equal to actual file size.Soft Links ... Read More

Create Key Binds in Linux Using the Terminal

Shilpa S
Updated on 01-Jul-2021 14:11:39

2K+ Views

To set Readline key bindings and variables in the Linux system, we use the bind command.The bind is used to assign functions and macros to a key. It allows to create hotkeys instead of typing the entire command. The bind command available in the shell built-in command.SyntaxThe syntax of the bind command is as follows.bind [-lpsvPSVX] [-m KEYMAP] [-f FILENAME] [-q NAME] [-u NAME] [-r KEYSEQ] [-x KEYSEQ:shell-command]The general syntax of the bind command seems so complicated, but the bind command is simple to use and we can easily create macros.Brief description of options available in the bind command.Sr.No.Option & ... Read More

Display Material Chip View in React Native

Shilpa S
Updated on 01-Jul-2021 09:35:14

922 Views

To display chips in the UI, we are going to make use of React Native Paper Material Design.Install react native paper as shown below −npm install --save-dev react-native-paperThe chip component looks as follows on the UI −The basic chip component is as follows −Chip NameThe basic properties of chip are as follows −PropsDescriptionmodeThe values for mode are flat and outlined. With flat mode you will not get a border and with outlined the border for the chip will be displayed.iconThe icon to be given to the chip.selectedThe values are true/false. If true the chip will be selected.selectedColorColor to be given ... Read More

Working of Animations in React Native

Shilpa S
Updated on 01-Jul-2021 09:31:50

437 Views

React Native offers an Animation component that helps to add more interactivity to components available.The animation component can be used to animate View, Text, Image, ScrollView, FlatList and SectionList.React Native provides two types of animation −Animated APILayoutAnimationAnimated APIThe animated api helps to provide time based animation based on the input/output.In this example, we will dynamically change the width and the height of the box using animated timing api.To work with animation, import the component as shown below −import { Animated } from 'react-native'To work with Animation, we need to configure it first as shown below −The Animated.timing() function makes use ... Read More

Show a Checkbox in React Native

Shilpa S
Updated on 01-Jul-2021 09:28:06

3K+ Views

Checkboxes is a common component that we often use on the UI. We do have some cool ways of showing checkboxes in reactnative.The core react-native package does not have checkbox support and you need to install a package to work with it.Following package has to be installed to display checkbox −npm install --save-dev react-native-paperThe basic checkbox component is as follows −Let us now see some important properties on checkbox −PropsDescriptionstatusThe value that can be given to status are checked, unchecked and indeterminate.disabledThe value is boolean.It can be used to enable/disable the checkbox.onPressThe function that will be called when the checkbox ... Read More

Display Date and Time Picker in React Native

Shilpa S
Updated on 01-Jul-2021 08:56:57

9K+ Views

To display date and time picker in your app you have to install a package as shown below −npm install @react-native-community/datetimepicker --saveOnce you are done installing, let us now proceed on how to display a Datepicker first.Example: DateTimePicker in ReactNativeImport the datetimepicker component first as shown below −import DateTimePicker from '@react-native-community/datetimepicker';A basic DateTimePicker component looks as follows −Here are some of the important properties of DateTimePicker.PropsDescriptionmodeDefines the type of picker you want. The options are date, time, datetime and countdown.From above options datetime and countdown are available only on iOS.displayThe values for Android are default, spinner, calendar and clock. For ... Read More

Explain React Native SwitchSelector Component

Shilpa S
Updated on 01-Jul-2021 08:52:48

421 Views

SwitchSelector component is similar to a radio toggle button. It allows you to select with more than 2 values.To work with SwitchSelector you have to install the package as shown below −npm i react-native-switch-selector --save-devThe basic SwitchSelector looks as follows − console.log(`value selected is : ${value}`)} />Here are some important properties of SwitchSelector −PropsDescriptionoptionsAn array with label, value and imageicon id required.initialThe initial item from the array that will be selected.valueThe switch value that will be available with onPress eventonPressThe event with callback function that will get called when the Switch is changed.fontSizeThe fontSize to be considered for the label.selectedColorThe ... Read More

Advertisements