using cd to directory ApacheDirectoryStudio like so:
#cd Apache*
causes an error:
bash: cd: too many arguments
Someone please tell me this is a bug and being fixed in the next issue of bash. Doesn't anyone use regular expressions any longer?
cd with wild card causes error too many arguments
Re: cd with wild card causes error too many arguments
It's not a bug, it's a user error. You have multiple things that match the pattern you gave to cd and cd expects one and only one argument.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: cd with wild card causes error too many arguments
Ummm...no, it is a bug, or at least unexpected behavior based on a few years of experience with UNIX shells. I have one directory in my current directory, using a wild card as I am should return an unambiguous path for cd command.
I have been using cd like this for years, still am on other versions of LINUX. This is new, and unwelcomed, behavior from a bash shell. I believe it is a bug.
[root@jupiter apache]# ls -l
total 147892
drwxr-xr-x 6 root root 196 Apr 11 2020 ApacheDirectoryStudio
-rw-r--r-- 1 root root 151438336 Dec 5 13:50 ApacheDirectoryStudio-2.0.0.v20200411-M15-linux.gtk.x86_64.tar
[root@jupiter apache]# cd Apach*
bash: cd: too many arguments
[root@jupiter apache]#
I have been using cd like this for years, still am on other versions of LINUX. This is new, and unwelcomed, behavior from a bash shell. I believe it is a bug.
[root@jupiter apache]# ls -l
total 147892
drwxr-xr-x 6 root root 196 Apr 11 2020 ApacheDirectoryStudio
-rw-r--r-- 1 root root 151438336 Dec 5 13:50 ApacheDirectoryStudio-2.0.0.v20200411-M15-linux.gtk.x86_64.tar
[root@jupiter apache]# cd Apach*
bash: cd: too many arguments
[root@jupiter apache]#
Re: cd with wild card causes error too many arguments
It (sort of) works in C7: it takes the first file/directory alfabetically
sorted and if that's a directory, it works. Not so in C8.
sorted and if that's a directory, it works. Not so in C8.
Re: cd with wild card causes error too many arguments
Well, now I don't have to worry about it.
Moving on to Oracle Linux, where that command works.....
Moving on to Oracle Linux, where that command works.....
Re: cd with wild card causes error too many arguments
So try Oracle Linux since CentOS is now a memory...where this command works, and you can write me about what a bug the command is and I can write you about my 35 years of UNIX.....
Re: cd with wild card causes error too many arguments
From the Bash 4.4rc1 changelog:
If you want the old behavior then recompile Bash with this #define unset.There is a new option settable in config-top.h that makes multiple directory arguments to `cd' a fatal error.