[Solved] Tail command issue in Linux


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers [Solved] Tail command issue in Linux
# 1  
Old 04-05-2013
[Solved] Tail command issue in Linux

Hello,

When I am trying to use tail +13 filename.csv it is throwing an error.

tail: cannot open `+13' for reading: No such file or directory and then prints last 10 lines of the file. (File is present on the path)

But when i try tail -13 filename.csv it runs perfectly.

Could I have some help to understand what is the issue here.
# 2  
Old 04-05-2013
+ may not be available in your tail command.Check man tail
# 3  
Old 04-05-2013
In man tail..
I could see the following line:
If the first character of N (the number of bytes or lines) is a '+', print beginning with the Nth item from the start of each file,
otherwise, print the last N items in the file.
# 4  
Old 04-05-2013
As per my understanding, if we use tail +13 it will ignore last 13 lines and will display the rest of the lines in the file.
# 5  
Old 04-05-2013
actually this command displays all the records from line no. 13 till last record. Earlier it was running fine, not sure what's the issue now.
# 6  
Old 04-19-2013
I have checked this with our admin and found out that new linux version (RHEL5) doesnot support head + or tail + command.

Thanks for your suggestions.

Moderator's Comments:
Mod Comment edit by bakunin: thanks for the follow-up. We always appreciate to know the way a problem was solved or the reason for it. I changed the thread-title accordingly.

Last edited by bakunin; 04-19-2013 at 10:05 AM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Simple sed command not working; could be a Mac/Linux vs. PC/Linux issue

Hello, I am on a Mac and trying to clean up some monthly files with a very simple SED: sed '3,10d;/<ACROSS>/,$d' input.txt > output.txt (from the input, delete lines 3 - 10; then delete from the line containing <ACROSS> to the end of the file) then output to output.txt Even when I try... (2 Replies)
Discussion started by: verbatim
2 Replies

2. Red Hat

Issue in tmadmin command in Linux

Hi , I am trying to execute the below command, i got error msg.. Please advice me how to solve this See, When i raised psr cmd., then i got error like above , Please help on this THanks Mani (0 Replies)
Discussion started by: Mani_apr08
0 Replies

3. Solaris

[SOLVED] Issue with hostname command

Hi, i'm having issues with one of my db servers, each time i run the hostname command i get "-a" as result this is the only zone on this server where i have this issue. could any one help me with this issue (5 Replies)
Discussion started by: EduardoDiaz
5 Replies

4. Red Hat

Issue in Linux Command

Hi, :wall: I am not able to run any utility command in Redat, Please see the below example and suggest me how I shall run this type of command. $ su Password: # ifconfig bash: ifconfig: command not found # which ifconfig /usr/bin/which: no ifconfig in... (3 Replies)
Discussion started by: pradipta_pks
3 Replies

5. Shell Programming and Scripting

Sed command issue in linux

I ran one the script in debug mode in linux and have a problem ret='$prmAttunityUser=ais' Now i need to remove $ from this '$prmAttunityUser=ais' so i had added a sed command like this sed 's/$//g' but its not working could you all please help me with an alternate command I want the output... (3 Replies)
Discussion started by: vee_789
3 Replies

6. Shell Programming and Scripting

AWK / tail Issue

Hello, I am using a tail command to fetch the line before last in a log file. the two last lines are as followed: 11-01-16 11:55:45.174 | CClientObject::InitTraceLevelInCache Starting CClientObject::InitTraceLevelInCache End I am doing a awk statement to gather only the numeric... (1 Reply)
Discussion started by: LiorAmitai
1 Replies

7. Shell Programming and Scripting

tail issue!

Hi, I had few scripts which were running fine on linux: uname -a Linux ######### 2.6.9-89.ELsmp #1 SMP Mon Apr 20 10:33:05 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux from some front end application. Recently there was a migration of this application on some other linux m/c: uname -a... (4 Replies)
Discussion started by: dips_ag
4 Replies

8. Shell Programming and Scripting

[Solved] Help piping tail to read STDIN

Hello everybody, I need some help here. I have a log file that gets updated every hour approximately. I want to make some processing on each line which is added in the log file with a program written in PERL. The problem is that I don't see anything when a line is added in the log file. I... (6 Replies)
Discussion started by: Samb95
6 Replies

9. Shell Programming and Scripting

Issue with Find command on Linux

Hi, I am issuing find command below mentioned ways but it givs different count. I don't understand the behaviour. Could any one have any clue? $ find . -mtime -5 -maxdepth 1 -exec ls -lrt {} \; | wc -l 169 $ find . -mtime -5 -maxdepth 1 | wc -l 47 $ find . -mtime -5 -maxdepth 1 | wc -l... (2 Replies)
Discussion started by: siba.s.nayak
2 Replies

10. Shell Programming and Scripting

Issue Filtering Tail

Hi Folks, I have a log that contains data as shown below: 11:59:43,144 (1,850) Signal : .... 11:59:44,109 (1850) Bps : ..... I wish to remove "" from all lines and it is on the start of every line. I have achieved that successfully using the command: tail -f imp.log | sed 's/\... (4 Replies)
Discussion started by: umairrahman
4 Replies
Login or Register to Ask a Question