cancel
Showing results for 
Search instead for 
Did you mean: 

WHY? is it so hard to get Linux to work?

MisterW
Superuser
Superuser
Posts: 14,764
Thanks: 5,530
Fixes: 395
Registered: ‎30-07-2007

Re: WHY? is it so hard to get Linux to work?

All again shutter, with the updated 2nd line and this time don't forget the space after the cd in
Quote
cd  /etc/usb_modeswitch.d
Roll_eyes

Superusers are not staff, but they do have a direct line of communication into the business in order to raise issues, concerns and feedback from the community.

MisterW
Superuser
Superuser
Posts: 14,764
Thanks: 5,530
Fixes: 395
Registered: ‎30-07-2007

Re: WHY? is it so hard to get Linux to work?

Quote
Lips_are_sealed <censored> Lips_are_sealed

No sitting on the sidelines there Jim, feel free to join in... Grin

Superusers are not staff, but they do have a direct line of communication into the business in order to raise issues, concerns and feedback from the community.

shutter
Community Veteran
Posts: 22,218
Thanks: 3,777
Fixes: 65
Registered: ‎06-11-2007

Re: WHY? is it so hard to get Linux to work?

Ok this is on the LInux Mint 11 machine.... cos there is so much response to the sed line... ( I put a semi colon in before 1446 on the last one) !
copy of the terminal page
> cd /etc/usb_modeswitch.d
> tar -xvf /usr/share/usb_modeswitch/configPack.tar.gz "12d1:1446"
> sed -i -e `s/14ac/14ac,1506/1 "12d1:1446"
bash: s/14ac/14ac,1506/1: No such file or directory
cat: 12d1:1446: No such file or directory
sed: option requires an argument -- 'e'
Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]...
  -n, --quiet, --silent
                suppress automatic printing of pattern space
  -e script, --expression=script
                add the script to the commands to be executed
  -f script-file, --file=script-file
                add the contents of script-file to the commands to be executed
  --follow-symlinks
                follow symlinks when processing in place
  -i[SUFFIX], --in-place[=SUFFIX]
                edit files in place (makes backup if extension supplied)
  -l N, --line-length=N
                specify the desired line-wrap length for the `l' command
  --posix
                disable all GNU extensions.
  -r, --regexp-extended
                use extended regular expressions in the script.
  -s, --separate
                consider files as separate rather than as a single continuous
                long stream.
  -u, --unbuffered
                load minimal amounts of data from the input files and flush
                the output buffers more often
      --help    display this help and exit
      --version  output version information and exit
If no -e, --expression, -f, or --file option is given, then the first
non-option argument is taken as the sed script to interpret.  All
remaining arguments are names of input files; if no input files are
specified, then the standard input is read.
GNU sed home page: <http://www.gnu.org/software/sed/>.
General help using GNU software: <http://www.gnu.org/gethelp/>.
sed: -e expression #1, char 4: extra characters after command
gerry-Inspiron-2200 gerry #
gerry-Inspiron-2200 gerry # cat "12d1:1446"
cat: 12d1:1446: No such file or directory
MisterW
Superuser
Superuser
Posts: 14,764
Thanks: 5,530
Fixes: 395
Registered: ‎30-07-2007

Re: WHY? is it so hard to get Linux to work?

Sorry ejs , I'm going to have to leave that one to you , obviously there's a syntax error in the sed line but I'm no sed expert.

Superusers are not staff, but they do have a direct line of communication into the business in order to raise issues, concerns and feedback from the community.

ejs
Aspiring Hero
Posts: 5,442
Thanks: 631
Fixes: 25
Registered: ‎10-06-2010

Re: WHY? is it so hard to get Linux to work?

First things first, has a file called "12d1:1446" been extracted? Adding -v to "tar" commands makes it print out file names.
if you type:
ls -l
it should say:
total 4
-rw-r--r-- 1 root root 306 Feb 26 16:20 12d1:1446
shutter
Community Veteran
Posts: 22,218
Thanks: 3,777
Fixes: 65
Registered: ‎06-11-2007

Re: WHY? is it so hard to get Linux to work?

I put in LS - L  (lower case) ls -l
and got
total 32
drwxr-xr-x 2 gerry  4096 2011 -08-02 15:06 Desktop
ditto Documents
ditto Downloads
ditto Music
ditto Pictures
ditto Public
ditto Templates
ditto Videos    (with slightly different times on the lines)
Is  -I  (capital letters) gave Is :command not found
and same for  small letter is - i....
ejs
Aspiring Hero
Posts: 5,442
Thanks: 631
Fixes: 25
Registered: ‎10-06-2010

Re: WHY? is it so hard to get Linux to work?

Sorry, do:
ls -l /etc/usb_modeswitch.d

Is that easier to read? Commands in Linux are case-sensitive, and usually lower case.
I wanted to check what files are in the /etc/usb_modeswitch.d directory.
shutter
Community Veteran
Posts: 22,218
Thanks: 3,777
Fixes: 65
Registered: ‎06-11-2007

Re: WHY? is it so hard to get Linux to work?

is that L or 1 ?
1s -1 gives me
1s : command not found
lower case Ls -L  etc gives me
total 4
- rw-r- - r - - 1 root root 306 2011 - 02 -26 11:20 12dl:1446
(edited and corrected ) ! ! !


ejs
Aspiring Hero
Posts: 5,442
Thanks: 631
Fixes: 25
Registered: ‎10-06-2010

Re: WHY? is it so hard to get Linux to work?

They were both Ls.  Cry
Perhaps I should have said:
dir --format=long
shutter
Community Veteran
Posts: 22,218
Thanks: 3,777
Fixes: 65
Registered: ‎06-11-2007

Re: WHY? is it so hard to get Linux to work?

see reply 65 above... for the answer to dir format long  Cheesy
ejs
Aspiring Hero
Posts: 5,442
Thanks: 631
Fixes: 25
Registered: ‎10-06-2010

Re: WHY? is it so hard to get Linux to work?

dir  --format=long  /etc/usb_modeswitch.d
shutter
Community Veteran
Posts: 22,218
Thanks: 3,777
Fixes: 65
Registered: ‎06-11-2007

Re: WHY? is it so hard to get Linux to work?

same as reply 67 above... (corrected from "root toot"  and adde "total 4" 
but should read 12d1:1446 not 12dl ! ! !
Cheesy
ejs
Aspiring Hero
Posts: 5,442
Thanks: 631
Fixes: 25
Registered: ‎10-06-2010

Re: WHY? is it so hard to get Linux to work?

So far so good.
As for the sed command, putting things inside single quotes ' (apostrophe) is just a habit of mine. But ` ("grave accent" as character map calls it) does something totally different.
Anyway, the apostrophes are not needed. So, as root:
cd /etc/usb_modeswitch.d
sed    -i    -e      s/14ac/14ac,1506/      "12d1:1446"
PS: all these USB IDs are in hexadecimal, the only possibilities are digits 0-9 and letters a-f.
shutter
Community Veteran
Posts: 22,218
Thanks: 3,777
Fixes: 65
Registered: ‎06-11-2007

Re: WHY? is it so hard to get Linux to work?

Ok... first line returned
/etc/usb_modeswitch.d $
sed  -i  -e etc returned
sed: couldn`t open temporary file  ./sedLrgD39: permission denied
shutter
Community Veteran
Posts: 22,218
Thanks: 3,777
Fixes: 65
Registered: ‎06-11-2007

Re: WHY? is it so hard to get Linux to work?

Oops,, sorry  forgot ,.. I closed the terminal window, and forgot to start off with "su"... will do it again.