I face the problem with
$_
usage,
which $_
special parameter in terminal, And its call the last argument of the previous command.
It was not work with cp
and mv
command in gnome-terminal.It happen to me during folder creation and mv
or cp
file with $_ like below
mkdir test
cp file.c $_
instead of copying file to destination , it create a file in current directory named _filedir
.
Same happen with mv
command
mkdir test
mv file.c $_
instead of moving file to destination, It moving in the name _filedir
.
To find the problem i use echo
$ mkdir test
$ echo $_
_filedir
Why is $_ not working with cp, mv commands?
cd
directory or even get echo afterls
command after usingls
, I got the directory name.But with this above scenario, Its not working