answersLogoWhite

0

Use the following command:

head -4 filename

Note: this only works on line terminated (newline) text files. The 'filename' can be any file.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

Which command be used to clear the screen and display the operating system prompt on the first line of the display?

t


How do you start the display program in Linux from the command line?

the command "display" brings up the ImageMagick program.


Which of the following command is used to display the first 10 line of a file in Linux?

$ cat filename | head


How should you do if the command line and status bar disappear of GstarCAD?

You can control the visibility of status bar in view>display>status bar; Ctrl+9 controls the visibility of command line


How should you do if the command line and status bar disappear in GstarCAD?

You can control the visibility of status bar in view>display>status bar; Ctrl+9 controls the visibility of command line


How do you switch between dialog boxes and the command line in gstarcad?

You can display prompts on the command line instead of using a dialog box, or switch back again. This option is useful primarily when using scripts.Some functions are available both on the command line and in a dialog box. In many cases, you can enter a hyphen before the command to suppress the dialog box and display prompts on the command line instead. For example, entering layer on the command line displays the Layer Properties Manager. Entering -layer on the command line displays the equivalent command line options. Suppressing the dialog box is useful for compatibility with earlier versions of GstarCAD? and for using script files. There may be slight differences between the options in the dialog box and those available on the command line.


What Linux command can be used to display the usage and how to use other command-line tools?

The df command displays drive capacities. The free command will show memory usage. The top command will show the system load of various processes.


What is the unix command to display the size and names of the six largest files in the current directory listed in descending order of their size?

Try: ls -lS | head -7 The 'head' command uses 7 instead of 6 because the first line is the long listing totals line, and isn't a file.


What command-line tool would help you discover for which port numbers your computer is listening?

Running netstat -a display all ports that are listening on a machine at the time the command is run.


What is the Draw Multileader in GstarCAD?

Multileaders can be created arrowHead first, leader Landing first or Content first. If a multileader style has been used, then the multileader can be created from that specified style. After executing MLEADER command or selecting the icon in the leaders panel, a message will display in the command line> Specify leader arrowhead location or leader Landing first/Content first/Options


Why can't you run PHP from the command line?

There is no problems with running php from the command line be it unix or windows. However the output of the command will be to stdout in the form of HTML text output. This HTML output is infact what is displayed with formatting and graphics by a web browser. In addition php run by the webbrowser and from the command line maybe at different user privileges and display differently.


What command do you use to view IP address information?

For Unix/linux, use the 'ifconfig' command. For Windows, use 'ipconfig'