LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   CentOS (https://www.linuxquestions.org/questions/centos-111/)
-   -   centos 7, dd, and filename completion (https://www.linuxquestions.org/questions/centos-111/centos-7-dd-and-filename-completion-4175523747/)

Doug G 10-29-2014 10:37 PM

centos 7, dd, and filename completion
 
I have installed a couple CentOS servers, and in all the dd program will no longer do filename completion for the if= or of= parameters. Tab does nothing, so I often have to open another terminal to see what the heck I really used for a filename.

All other programs I have used do filename completion fine.

Is this some new "feature" of dd, or just a bug? Anyone else see this behavior in v7? BTW, my Fedora 20 machine doesn't have this problem with dd

notKlaatu 10-29-2014 10:48 PM

It should auto complete. Are you providing the full and correct path?

Also, what terminal are you using? BASH? Is BASH auto completing elsewhere?

Doug G 10-30-2014 04:24 PM

Yes I use bash, and yes autocompletion is working in every other script/program that I use.

An example: I have a root terminal open to a current directory with a file vm148.iso. If I enter dd if=v<TAB> nothing comes back. If I enter cp v<TAB> the complete file name shows right up. dd is the only program that is acting differently than previous versions. I don't see this problem with dd in centos 6.5.

I have this kernel: 3.10.0-123.8.1.el7.x86_64 x86_64 GNU/Linux

As near as I can deduce, something changed in the dd program for this centos release.

I forgot to add, centos 7 has dd v8.22 and fedora 20 has dd v8.21

notKlaatu 10-30-2014 06:00 PM

Interesting.

What happens if you enter

Code:

dd [space] if= [space] v<TAB>
and if that auto completes, does it also actually work? dd should ignore the space...but who knows...

Doug G 10-30-2014 08:18 PM

Thank you. Changing the = to a space does command completion. Apparently the syntax is changed a bit in this version of dd, and the man page isn't updated since it still says:
Quote:

if=FILE
read from FILE instead of stdin
I've always used =, but it's easy enough to change my habits.

Anyway, thank you for your help!

ondoho 10-31-2014 02:41 PM

doug g, somehow i have the feeling you got this wrong.

which version of dd are you running?

mine:
Code:

$ dd if livarp_cli_20140808.iso of /dev/zero
dd: unrecognized operand ‘if’
Try 'dd --help' for more information.

$ dd --version
dd (coreutils) 8.23


Doug G 10-31-2014 03:48 PM

Quote:

which version of dd are you running?
As I posted above, the fedora 20 version is 8.21 and the centos 7 version is 8.22. 8.22 is the version that is operating differently.

The 8.21 version does not seem to like a space immediately after the if operator. The 8.22 version doesn't like an =

You seem to have v8.23, perhaps there is an update I haven't installed yet. This CentOS 7 install is about 2 weeks old, installed from DVD as minimal installation, and updated with the included repositories. I added the epel repo, that's all.

Quote:

Installed Packages
coreutils.x86_64 8.22-11.el7 @anaconda
and there is no newer version available as of right now.


All times are GMT -5. The time now is 11:39 AM.