answersLogoWhite

0

At the prompt, type:

head filename

For example, if you have a file named file.txt, type:

head file.txt

To fetch a specific number of records from a file, e.g. 15, type:

head -15 file.txt

To see more options of 'head' command run 'man head'.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

How many records does the file contain?

To determine how many records a file contains, you can open the file and check its properties or use a command in a programming language or command line interface that counts the entries. The exact method will depend on the file format (e.g., CSV, JSON, etc.). Once you access the file, you can easily find the total number of records included.


How do you make a new command in Unix?

first, make a file. in the file you type in the command's name. an example would be the command date. name the file what you want to call that command. when you use the command, type in cat filename and the computer will do the command.


What Linux command is used for displaying all the records with space or special characters between fields in the file?

cat


What is the unix command to display the first two characters of all the lines from a file?

Assuming that the file you are looking at is a columnar file you can use the 'cut' command, as in 'cut -c1-2 filename'


Is save command used for save a file first time?

yes


How can I use ffmpeg to extract the first frame from a video file?

You can use ffmpeg to extract the first frame from a video file by running the following command in the terminal: bash ffmpeg -i inputvideo.mp4 -vframes 1 outputimage.jpg This command will extract the first frame from the input video file "inputvideo.mp4" and save it as an image file "outputimage.jpg".


What command do you use to save a file?

The Save command, which can also be activated by the Ctrl - S keyboard shortcut. If it is the first time it is being saved, then you can use Save As. This will happen automatically as when it is first saved you need to specify a name, location and the file type for the file.


When are records transferred from the general alphabetic file to the numbered file?

When are records transferred from the general alphabetic file to the numbered file?


Why file command is used in unix?

The 'file' command in Unix attempts to guess what type of file you are looking at by reading the first several sections of the file and comparing it to a list of known contents for files. It is a useful command if you just want to know what type of file something is without having to examine it yourself. The command is not perfect because it does not detect all types of files but it does a reasonable job of guessing. It is used because in Unix there are no file extension types to tell us what kind of file a given file might be; you have to look inside the file to tell how it might be used.


What is a file command used to create or start a new file?

The 'touch' command creates a new empty file in Unix.


How can I use ffmpeg to convert a WMV file to an MP4 file?

You can use ffmpeg to convert a WMV file to an MP4 file by running a command in the terminal or command prompt. The command typically looks like this: ffmpeg -i inputfile.wmv outputfile.mp4 This command will convert the WMV file named "inputfile.wmv" to an MP4 file named "outputfile.mp4".


What does the command prompt DEL do?

the DEL command deletes a specified file when typed in the form below: del file for more information about the command, type : del /? in command prompt