LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 10-29-2014, 10:37 PM   #1
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
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
 
Old 10-29-2014, 10:48 PM   #2
notKlaatu
Senior Member
 
Registered: Sep 2010
Location: Lawrence, New Zealand
Distribution: Slackware
Posts: 1,077

Rep: Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732
It should auto complete. Are you providing the full and correct path?

Also, what terminal are you using? BASH? Is BASH auto completing elsewhere?
 
Old 10-30-2014, 04:24 PM   #3
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Original Poster
Rep: Reputation: Disabled
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

Last edited by Doug G; 10-30-2014 at 04:32 PM.
 
Old 10-30-2014, 06:00 PM   #4
notKlaatu
Senior Member
 
Registered: Sep 2010
Location: Lawrence, New Zealand
Distribution: Slackware
Posts: 1,077

Rep: Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732
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...
 
Old 10-30-2014, 08:18 PM   #5
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Original Poster
Rep: Reputation: Disabled
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!
 
Old 10-31-2014, 02:41 PM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
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
 
Old 10-31-2014, 03:48 PM   #7
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Original Poster
Rep: Reputation: Disabled
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.

Last edited by Doug G; 10-31-2014 at 03:53 PM.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Docker command completion on Centos 7? szboardstretcher Linux - Virtualization and Cloud 1 10-12-2014 01:51 AM
Filename completion in a specific directory for a specific command using tcsh Leo Simon Linux - Software 3 12-29-2012 10:44 AM
[SOLVED] Special chars on filename problems with Centos and Apache jmandrak Linux - General 6 07-21-2009 07:37 PM
coloring TAB output for filename completion glinux Linux - Newbie 0 03-02-2009 10:34 PM
Convert static library (Filename.a) to dynamic shared object (filename.so) afx2029 Linux - Software 4 08-17-2007 06:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 03:41 PM.

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