You are not logged in.
For about a year now I've used this line of code from my .bash_aliases file to untar files from their source directory to the one I am currently CDed in at that moment:
alias tarx='tar xvf' # extracts files from a tarball using tar [e]x[tract] v[erbose] f[orced]This alias failed to work a few weeks ago for some unknown reason and now spits out this error:
tarx /media/aur/srcpackages/atom-editor.tar.gz ./
tar: .: Not found in archive
tar: Exiting with failure status due to previous errorsWhy on earth would this suddenly stop working. I haven't changed my .bashrc file apart from some small comments but here it is in case I'm totally out of it:
# ~/.bashrc
######################################################################
# #
# This file is sourced by all *interactive* bash shells on startup, #
# including some apparently interactive shells such as scp and rcp #
# that can't tolerate any output. So make sure this doesn't display #
# anything or bad things will happen ! #
# #
# If not running interactively, don't do anything #
# #
######################################################################
[[ $- != *i* ]] && return
#################################################################################
# #
# If the connection to the system is a remote connection 'ssh' will be #
## appended to the prompt. Otherwise the prompt will be displayed normally #
# See: remote.colourful.prompt_how-to on /media/lynwyn/networking/ssh #
# #
# Default prompt from the above-named document: #
# export PS1='\[\e[0;31m\]\u@\h:\w${text}$\[\e[m\]' # # #
#################################################################################
if [ -n "$SSH_CLIENT" ]; then text=":ssh:"
fi
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
### [User Prompts]
### White Yunzi
export PS1='\[\e[0;37m\]: \[\e[1;92m\]\W\[\e[0;37m\] :\[\e[m\] \[\e[0;37m\]'
#### Silver Yunzi
#export PS1='\[\e[0;37m\]: \[\e[1;94m\]\W\[\e[0;37m\] :\[\e[m\] \[\e[0;37m\]'
### Pink Yunzi
#export PS1='\[\e[0;37m\]: \[\e[1;95m\]\W\[\e[0;37m\] :\[\e[m\] \[\e[1;95m\]'
### [Root Prompts]
### White Yunzi Root
#export PS1='\[\e[1;37m\]:\[\e[1;92m\]\u\[\e[1;37m\]:\[\e[1;92m\]\W\[\e[1;37m\]:\[\e[m\] \[\e[0;37m\]'
### Silver Yunzi Root
#export PS1='\[\e[0;37m\]:\[\e[1;94m\]\u\[\e[0;37m\]:\[\e[1;94m\]\W\[\e[0;37m\]:\[\e[m\]\[\e[0;37m\]'
### Pink Yunzi Root
#export PS1='\[\e[0;37m\]:\[\e[1;95m\]\u\[\e[0;37m\]:\[\e[1;95m\]\W\[\e[0;37m\]:\[\e[m\] \[\e[0;37\]'
### * BASH options * ###
### Last edited January 2014 by H.L.
# Bash won't get SIGWINCH if another process is in the foreground.
# Enable checkwinsize so that bash will check the terminal size when
# it regains control.
# [check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.]
# http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11)
shopt -s checkwinsize
# automatically prepend cd when entering just a path in the shell
shopt -s autocd
# Enable history appending instead of overwriting.
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=10000
HISTFILESIZE=20000
## erase duplicate entries in your history file
## and force Bash History to ignorespace
export HISTCONTROL=erasedups:ignorespace
###
# set variable identifying the chroot you work in (used in the prompt below)
#if [ -z "$arch_chroot" ] && [ -r /etc/arch_chroot ]; then
# debian_chroot=$(cat /etc/arch_chroot)
#fi
# make "less" more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
###
# TMUX
# Put this this snippet BEFORE the aliases in .bashrc.
# This code starts TMUX with only one session (unless you start some manually), on login;
# it will try to attach to a currently running session.
# If there isn't a currently running session then TMUX will create one.
# if which tmux 2>&1 >/dev/null; then
# if not inside a tmux session, and if no session is started start a new session
# test -z "$TMUX" && (tmux attach || tmux new-session)
# fi
###
# environment variables using gedit and nano
export EDITOR="$(if [[ -n $DISPLAY ]]; then echo 'gedit'; else echo 'nano'; fi)"
###
### Coloured man pages with explanations of colours in comments
# Note to self: all of the colour & escape statements work ONLY by using double quote marks, e.g. " ... "
## Coloured man pages with explanations of colours in comments
# 67: Primary colour for program names is Dark Green [old 80's CRT green!]
# 68: Optional arguments and/or separate options for arguments is Bright Green
# 69: Text Reset
# 70: Text Reset
# 71: man page info bottom of page is Dark Red on Black background (net effect is transparent background with red writing)
# 72: Text Reset
# 73: References to other programs (and their respective man page(s)) are Bright Yellow [good neutral yellow]
man() {
env LESS_TERMCAP_mb=$(printf "\e[1;31m") \
LESS_TERMCAP_md=$(printf "\e[1;31m") \
LESS_TERMCAP_me=$(printf "\e[0m") \
LESS_TERMCAP_se=$(printf "\e[0m") \
LESS_TERMCAP_so=$(printf "\e[1;44;33m") \
LESS_TERMCAP_ue=$(printf "\e[0m") \
LESS_TERMCAP_us=$(printf "\e[1;32m") \
man "$@"
}
###
## To get a skin of your choice loaded instead of mc's default
## skin, you might consider the following solution:
## Multi-User: Create an alias for mc in your ~/.bashrc, like:
if [ $TERM = "screen-256color" ]; then
if [ $USER = "root" ]; then
myMCSkin="modarcon16root-defbg"
else
myMCSkin="modarcon16-defbg"
fi
alias mc='mc --skin $myMCSkin'
alias mcedit="mcedit --skin $myMCSkin"
alias mcview="mcview --skin $myMCSkin"
alias mcdiff="mcdiff --skin $myMCSkin"
fi
###Last edited by MoonSwan (2014-07-09 04:31:06)
Offline
Why do you need the './'?
Offline
I use that only because I try to untar apps while in the directory I want the files to be untarred into. I thought that ./ was the correct syntax to use to do that. Am I incorrect or is there a better way to do that?
For example I'll CD to ~/aur/sources and once I'm there I used my "tarx ~/aur/srces/nameofapptountar ./" so that the files would be untarred into the directory I was in at the time.
Offline
I get the same error as you if I use './' or '.'. tar runs fine if I omit the destination - it seems to default to pwd.
Offline
Read the tar manpage. The second parameter is the file to extract from the archive, not where to extract it.
"Only wimps use tape backup: _real_ men just upload their important stuff on ftp, and let the rest of the world mirror it."—Linus Torvalds
s/ftp/git/
https://iandouglasscott.com | https://github.org/ids1024 | https://keybase.io/ids1024
Offline
Read the tar manpage.
Arch doesn't ship the man page for tar ;P
Offline
Arch doesn't ship the man page for tar ;P
Really? Then use "tar --help".
edit: or "info tar"
Last edited by ids1024 (2014-06-28 03:37:17)
"Only wimps use tape backup: _real_ men just upload their important stuff on ftp, and let the rest of the world mirror it."—Linus Torvalds
s/ftp/git/
https://iandouglasscott.com | https://github.org/ids1024 | https://keybase.io/ids1024
Offline
I seem to have a larger problem on my desktop machine. When I try to untar stuff on that one it creates a .cache directory for some weird reason and populates it with, I think, cached files from my home directory. It ends up having firefox, mc and other cached files in the new directory and then tar just errors out with:
gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now Very odd behaviour and I'm assuming some config file somewhere is responsible for this behaviour. But where else can I look apart from .bashrc?
@ids1024, I'll do what you've what you suggested on my netbook later today and record the information to post afterward.
[edit] Here are the contents of that .cache directory, if it helps:
dconf event-sound-cache.tdb.silver_yunzi.x86_64-unknown-linux-gnu event-sound-cache.tdb.tengen.x86_64-unknown-linux-gnu fontconfig mc dmenu_run
event-sound-cache.tdb.silveryunzi.x86_64-unknown-linux-gnu event-sound-cache.tdb.white_yunzi.x86_64-unknown-linux-gnu gstreamer-1.0 mozilla Last edited by MoonSwan (2014-06-28 19:57:10)
Offline
I just listed the commands to view the documentation for tar.
What archive are you trying to extract, and exactly what command are you using?
"Only wimps use tape backup: _real_ men just upload their important stuff on ftp, and let the rest of the world mirror it."—Linus Torvalds
s/ftp/git/
https://iandouglasscott.com | https://github.org/ids1024 | https://keybase.io/ids1024
Offline
alias tarx='tar xvf' # extracts files from a tarball using tar [e]x[tract] v[erbose] f[orced]
That is a wrong description. It means t[ape]ar[chive] [e]x[tract] v[erbose] f[ilename]
Without f, tar would read the archive from stdin.
PS: I mostly use bsdtar to deal with archives, its compression autodetection feels more stable to me and since pacman already depends on libarchive, we have get it for free on arch.
Last edited by progandy (2014-06-28 20:44:48)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
Thanks for the explanation Progandy. ![]()
I'm marking this solved because some update fixed the issue. I don't know which update specifically but the problem has been mended.
Offline