Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-20-2012, 10:23 PM   #1
LQ Newbie
Registered: Nov 2012
Posts: 4

Rep: Reputation: Disabled
Terminal Stuff

Every time I launch a terminal I get this:

tar: option requires an argument -- 'f'
Try `tar --help' or `tar --usage' for more information.
[ted@localhost ~]$

Any ideas how I can fix this?

Old 11-20-2012, 10:45 PM   #2
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Looks like something in your shell startup scripts is trying to run tar with incorrect options. Look in ~/.bashrc and ~/.bash_profile. If you don't see anything that looks suspicious, try looking in /etc/profile and all the scripts in /etc/profile.d.

Just to be clear -- this is the very first thing you see when opening up a new terminal window from within a graphical desktop, correct?
Old 11-21-2012, 07:19 AM   #3
LQ 5k Club
Registered: Jan 2011
Location: Nowhere near you, thank God.
Distribution: OSX Sierra
Posts: 8,570
Blog Entries: 14

Rep: Reputation: Disabled
Originally Posted by tedb View Post
Every time I launch a terminal I get this:

tar: option requires an argument -- 'f'...
After the terminal is already open, what happens if you type "bash" in it? Error, or no?

env | grep tar
would be my suggestion on starting to track this down.
Old 11-21-2012, 09:22 AM   #4
LQ Newbie
Registered: Nov 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled

I get the same when I go into Bash. I edited my .bashrc file and setup aliases.

Not sure if it had something to do with that but I removed the tar alias I had setup.

Old 11-21-2012, 09:24 AM   #5
LQ Newbie
Registered: Nov 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
env | grep tar


LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00i=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01r=40;31;0 1:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42w=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01 ;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:* .Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.tbz=01;31:*.tbz2=01;31:*.bz=01;31 :*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7 z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01 ;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;3 5:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:* .mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm= 01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35 :*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.a ac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg= 01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:
Old 11-21-2012, 09:34 AM   #6
Senior Member
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
If you're using bash shell then check:
cat .bashrc | grep tar
cat .bash_profile | grep tar
If it fetches any entry stating with tar, then simply edit .bashrc/.bash_profile file and put a # against that line.
Or if using csh/tcsh shell, then do the same with .cshrc or .tcshrc files.
And if still pb persists, then also check .login or any personal startup file.
Old 11-21-2012, 11:29 AM   #7
Senior Member
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,665

Rep: Reputation: 486Reputation: 486Reputation: 486Reputation: 486Reputation: 486
1. If your aliases are written on the .bashrc, try comment "#" them out and see what happens.
2. If they are not written somewhere you unalias it, or logout login should erase.

There might be something wrong with your aliasing that called tar or colors.
Old 11-21-2012, 09:21 PM   #8
LQ Newbie
Registered: Nov 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Terminal Stuff

It was a mistake in the .bashrc file.

Fixed now. Thanks Everyone!!



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] how do i stuff a keystroke into another virtual terminal's stdin? RandomTroll Linux - Software 13 10-14-2014 02:27 PM
[SOLVED] Gnome terminal 2.1.0, centos 5 - how to 'find' text listed on terminal screen linuxquestions_forum_use Linux - Newbie 2 12-21-2010 08:35 PM
Where can I get tutorials or tips in doing stuff with fedoras terminal? windowsNilo Linux - General 9 07-08-2008 09:24 PM
Terminal Printing a Bunch of Stuff at Startup Klogg Linux - General 5 05-01-2006 03:45 AM
When installing new stuff in suse 9.1, do you uninstall old stuff first? randon SUSE / openSUSE 1 12-25-2004 04:37 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:27 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration