Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

print first lines of file linux

With the flag -n | N, the head command prints out the first N lines of file(s)

head -n 7 file.txt	#Prints first 7 lines of file.txt
Comment

linux get first line of file

# credit to Stack Overflow user in the source link

head -1 your_file
Comment

PREVIOUS NEXT
Code Example
Shell :: remove all untracked files git 
Shell :: install virtualbox extension pack from command line 
Shell :: how to install packages from jupyter notebook 
Shell :: remove git repository 
Shell :: check git username 
Shell :: gcloud set kubectl context 
Shell :: how to install wireshark 
Shell :: remove all folder except one linux 
Shell :: git log filter merge commits 
Shell :: shell script red color 
Shell :: bash get path of script 
Shell :: how to run spigot server using bat 
Shell :: check total folder size linux 
Shell :: change current branch git 
Shell :: delete previous word vim 
Shell :: git force push to remote 
Shell :: how to kill process ubuntu 
Shell :: increment in bash 
Shell :: command get full history terminal mac 
Shell :: install brew on mac 
Shell :: Pterodactyl wings update 
Shell :: watch and compile scss command 
Shell :: find recursive linux 
Shell :: applescript open new terminal tab 
Shell :: how to combine audio tracks ffmpeg 
Shell :: readme style 
Shell :: find node version 
Shell :: linux move all files to another folder 
Shell :: install gnome-clocks ubuntu 
Shell :: netbeans 8.2 download ubuntu 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =