LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 12: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 12:32 AM.
 
Old 01-16-2017, 03:38 AM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,309
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
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, 03: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, 03:56 AM   #4
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,309
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
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, 05:32 AM   #5
AnanthaP
Member
 
Registered: Jul 2004
Location: Chennai, India
Posts: 952

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


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 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 11:54 AM
screen: Something keeps typing "AT+GCAP" to my terminal displace Linux - Software 2 02-26-2014 04:50 AM
Why "-bash: ifconfig : command not found" when typing "$ifconfig" dangdtvn Linux - Server 9 09-20-2013 06:01 AM
[SOLVED] cant make a file executable by terminal typing "chmod +x layerfx.py" froylan Ubuntu 3 07-26-2012 02:41 PM
"segmentation error" when issuing "useradd" command through terminal with RH 9.0 kaihuang Linux - General 0 10-21-2003 11:47 PM

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

All times are GMT -5. The time now is 03:49 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