LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-16-2017, 01:18 AM   #1
d_K
Member
 
Registered: Aug 2016
Posts: 32

Rep: Reputation: Disabled
Question Typing out this command works over "pasting" it, could this be an anomaly in xfce4-terminal?


I'm seriously at a loss on this one. I wanted to zero out my usb drive the other day so I copied & pasted the command but my terminal emulator spat back an error saying the target device is not found (...or something to that effect, I don't remember the exact error.) The command in question:

Code:
sudo shred -vzn 0 /dev/sdd
...there's no fancy quotation marks, "sdd" is the actual usb drive listed in "disks", and yes -- that '0' is really a '0' not 'O'. The copy function did not include the carriage return character. I don't seem to recall this happening on MATE so my first guess is an anomaly in xfce4-terminal -- the default emulator in xfce. I then copied and pasted both commands into xed (i forgot which text editor fork this is based off of) to confirm both are textually-identical using ctrl+f and then comparing the strings.

Does anyone have a clue on this?

Last edited by d_K; 01-16-2017 at 01:32 AM.
 
Old 01-16-2017, 04:38 AM   #2
Turbocapitalist
Senior Member
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 4,440
Blog Entries: 3

Rep: Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210
In general it is important to first copy to a pain-text editor like xed or Gedit and the re-copy to the buffer to avoid any CSS or Javascript traps. It's good that you did that.

It'd be hard to say without seeing the exact web page that was the source. There are harmless but annoying invisible Unicode characters that can get in the way but a malicious site could do a lot of damage to your system with shred
 
Old 01-16-2017, 04:50 AM   #3
d_K
Member
 
Registered: Aug 2016
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Turbocapitalist View Post
In general it is important to first copy to a pain-text editor like xed or Gedit and the re-copy to the buffer to avoid any CSS or Javascript traps.
That's exactly what I did. I have a simple text file with useful commands and this is one of them. I can't figure out what the problem is so this needs to be on the x-files or something.

There's one possibility...I noticed the "line ending" selection is set on "windows" when "saving as" the file in xed. I know the windows carriage return is different than the "Unix" one so that might explain it. Could the xfce terminal emulator choke on a windows carriage return? It's not like I'm selecting multiple lines...I'm only selecting 1 line to copy in xed.
 
Old 01-16-2017, 04:56 AM   #4
Turbocapitalist
Senior Member
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 4,440
Blog Entries: 3

Rep: Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210
Yes, MS-DOS uses \r\n and the Unixes use \n, so that uneccessary \r might be in the way. What happens when you convert the file to Unix new lines and then try copy-paste?

If that trailing \r is somehow getting picked up by your buffer and pasted into the terminal, then it would be at the end, which you have as the device name. In such a case it would be normal to get a device not found error.
 
Old 01-16-2017, 06:32 AM   #5
AnanthaP
Member
 
Registered: Jul 2004
Location: Chennai, India
Distribution: UBUNTU 5.10 since Jul-18,2006 on Intel 820 DC
Posts: 900

Rep: Reputation: 210Reputation: 210Reputation: 210
whats dev/sdd mounted as?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Random Characters like "^[OR" popping up in the terminal, Disrupting typing. TheChronicScribbler Linux - Software 3 07-19-2014 12:54 PM
screen: Something keeps typing "AT+GCAP" to my terminal displace Linux - Software 2 02-26-2014 05:50 AM
Why "-bash: ifconfig : command not found" when typing "$ifconfig" dangdtvn Linux - Server 9 09-20-2013 07:01 AM
[SOLVED] cant make a file executable by terminal typing "chmod +x layerfx.py" froylan Ubuntu 3 07-26-2012 03:41 PM
"segmentation error" when issuing "useradd" command through terminal with RH 9.0 kaihuang Linux - General 0 10-22-2003 12:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration