/srv/irclogs.ubuntu.com/2013/02/04/#ubuntu-beginners.txt

blakegood evening. im having an issue on trying to disable my backlight on my sony vaio vpcf236fm. ive been searching everywhere and to no avail.00:26
=== jackyalcine is now known as zz_jackyalcine
=== zz_jackyalcine is now known as jackyalcine
=== jackyalcine is now known as Jacky_
=== Jacky_ is now known as zz_jackyalcine
* IveBeenBit is away: Walking teh dgo.01:18
=== zz_jackyalcine is now known as jackyalcine
=== jackyalcine is now known as Jacky_
=== Jacky_ is now known as zz_jackyalcine
rowen132hello02:07
=== zz_jackyalcine is now known as jackyalcine
iggy19hey all02:23
iggy19trying to do "cp -r /dirname/*.jpg /dirname2/jpgs" to move all jpgs out of a directory tree, but it says: no such file or directory - any ideas?02:24
inzaneGODhi02:24
iggy19rather - copy them, not move.02:24
iggy19anzaneGOD: howdy02:24
inzaneGODhow to chache specific website in squid 3.0? , help me guys, please02:25
iggy19erk *inzaneGOD: ^^02:25
inzaneGODhi iggy..02:25
inzaneGOD? :-*02:26
=== jackyalcine is now known as zz_jackyalcine
=== zz_jackyalcine is now known as jackyalcine
inzaneGOD...*...02:29
inzaneGODhow to chache specific website in squid 3.0? , help me guys, please02:30
iggy19I'm sure I am just being wicked stoopid, but cp -r seems to not be recursing.02:41
iggy19"cp -r /dirone/*jpg /dirtwo/" fails with file not found.02:42
iggy19if something matching *jpg is in /dirone/ it will be copied, but if the *jpg pattern is only found in /dirone/subdirectory/ it will fail with the above mentioned error02:43
iggy19TIA for any insight02:43
tsimpsonthat's exactly what you told it, /dirone/*jpg is interpreted by the shell and expands to multiple arguments to cp02:51
iggy19so, any tips on how to copy files matching a wildcard recursively out of a whole directory tree?02:55
iggy19tsimpson: thanks for the reply!02:55
tsimpsonif you want to recursively find all *.jpg files and copy to somewhere else, you can do: find /dirone -type f -name '*.jpg' -exec cp '{}' /dirtwo/ +02:55
tsimpson-type f means only files02:56
tsimpsonthe command after -exec is run replacing '{}' with all the files that match, and the + says to replace '{}' with all the file names rather than running the command once per file02:57
iggy19and find is always recursive?  I'll look at the manpage.  Not familiar with -exec either.  Seems like this would be a commonly desired command - surprised it is not more straightforward - also, google was not my friend on this one02:57
tsimpsonfind is always recursive unless you say "-maxdepth 1"02:57
iggy19tsimpson: thank you very much. have been banging my head for almost an hour and feeling very stoopid02:58
tsimpsononce you find find, you'll find you use it often :)02:58
iggy19using the "+" option is faster, because it is not calling cp 10,000 times?02:59
tsimpsonyeah02:59
=== jackyalcine is now known as Jacky_
iggy19kewl02:59
tsimpsonbut obviously you need a command that can take many arguments, cp is fine though03:00
iggy19I just tried it, and it says I am missing an argument to -exec03:03
iggy19I did modify your commandline to include "-exec cp -i '{}' /dir_two/03:03
tsimpsonhmm03:09
iggy19have been messing with it, and is consistently telling me "find: missing argument to `-exec'"03:10
tsimpsoniggy19: seems fine wants {} to be at the end, "-exec cp -i -t /dir_two/ '{}' +" should work03:10
iggy19hmmm wil try03:11
iggy19man page says -exec COMMAND {} +03:11
tsimpsonyeah03:13
* IveBeenBit is back (gone 02:19:42)03:37
=== Jacky_ is now known as zz_Jacky_
=== zz_Jacky_ is now known as jackyalcine
=== jackyalcine is now known as Jacky_
=== Jacky_ is now known as zz_Jacky_
=== zz_Jacky_ is now known as jackyalcine
=== jackyalcine is now known as Jacky_
=== Jacky_ is now known as zz_Jacky_
=== zz_Jacky_ is now known as jackyalcine
geirhaiggy19: since version 4, bash also has recursive globs if you enable them.   shopt -s globstar; cp /dirone/**/*.jpg /dirtwo  # however you risk overriding the max-args limit06:58
=== mysteriousdaren is now known as mysteriousdarren
iggy19geirha: a chunk of that went over my head, but I really appreciate your willingness to help!07:16
iggy19I think I might be hitting max-args in another situation right now07:17
iggy19mv /dir-one/* /dir-two/ results in "Argument list too long"07:17
iggy19using my new friend "find" to send those files to mv in chunks by using find -name '*'07:22
geirhahttp://mywiki.wooledge.org/BashFAQ/095 shows some ways to work around that07:22
geirha-name '*' is pointless. Might as well remove it. You're saying "Out of all files, pick all files"07:26
iggy19yes07:26
iggy19using it only to send batches to mv to prevent exceeding max args07:26
iggy19seems to be working07:26
geirhafind /dir-one/ ! -name dir-one -prune -exec sh -c 'mv "$@" /dir-two/' _ {} +07:27
iggy19sorry, over my head at this moment.  KISS applies for me right now, over elegance.  Sorting a lot of files I stoopidly deleted for a friend after recovering them from an ailing hard drive.  Doh!07:29
iggy19Can't spend an hour researching best way to do each step07:29
geirhathe -prune there avoids recursing. It's a bit magical.07:29
geirhaHm. You didn't go the ddrescue route I take it07:30
iggy19"find /dir-one/ -type f -name '*' -print -exec mv -v -t /dir-two/ '{}' \;" is actually working, and was the first thing I thought of to try, so I'm running with it07:31
geirhayou risk losing files with that07:32
iggy19I used photorec to recover the deleted files - it was an ntfs partition on an external drive07:32
iggy19please explain risk of file loss07:33
geirhaif there's /dir-one/foo/bla.txt and /dir-one/bar/bla.txt  they'll both be moved to /dir-two/bla.txt; one overwriting the other07:33
geirhayou can add -n (portable) or --backup=numbered (GNUism) to avoid it.07:34
iggy19I think photorec has named all recovered files uniquely.  If not, I've already clobbered them anyway.  That was a concern I investigated and hope I reached positive resolution on hours earlier in this process07:34
geirhayes, that's probably right07:35
iggy19--backup=numbered increments the filename for duplicates as it copies them?07:36
iggy19I saw that in some of the man pages, but didn't take the time to understand it07:36
geirhayes, you get bla.txt.~1~ bla.txt.~2~ etc07:36
iggy19^^ not so great to give them back to an unsavvy windows user who expects .extensions to rule the world07:37
geirhaWell, you'd just look for them afterwards, and rename them manually07:38
iggy19^^ FUN!07:38
geirhaTypically, there won't be that many, if any at all. Few enough to handle manually quick enough.07:39
iggy19I searched the original tree of recovered files for, say, *.gif and compared that count to the count of files copied by my initial "find ... -exec cp ..." command and they matched, so I figured I hadn't clobbered much if any07:40
iggy19I am trying to plan my operations to miminize both manual work and using commands I don't already grok, as much as possible07:43
=== jackyalcine is now known as Jacky_
=== Jacky_ is now known as jackyalcine
=== jackyalcine is now known as zz_jackyalcine
DejaVuHello. I'm using 12.04. Missing minimize/maximize/close buttons. Did compiz-decorator --replace to fix but after closing the terminal buttons disappeared again. Any help? Thanks16:37
geirhaDejaVu: That's because the terminal killed your compiz-decorator --replace when you killed it16:38
DejaVugeirha and how do fix that?16:38
geirhaDejaVu: run it via Alt+F2, or in the terminal, run it in the background by putting & after it, then run disown to disown it.16:39
DejaVugeirha: compiz-decorator --replace & disown16:41
DejaVulike this?16:41
geirhayes16:41
geirhaNow, when you close the terminal with the X-button, it will send SIGHUP to the shell (bash). bash in turn will send SIGHUP to all its children, but not compiz-decorator, since the shell disowned it.16:42
geirhaanother way is to simply exit the shell instead of closing the terminal. bash disowns its background jobs on exit; leaving them running.16:43
DejaVugeirha: it didn't do any good16:45
geirhaWell, that was a shell/terminal lesson. As for compiz-decorator crashing in the first place, that's a tougher one.16:47
geirhaHave you modified any compiz settings?16:47
DejaVunope, it happened after update16:47
geirhaDid you log out or reboot after the update?16:49
DejaVureboot16:49
geirhaHm. Sounds like the updates might have introduced or triggered a bug then16:52
DejaVuthanks for your time anyways16:53
=== histo2 is now known as histo
donalcorrhi, can anyone assist with an installtion of ubuntu on a samsung chromebook serirs 518:42
donalcorrhi, has anyone experience of installing ubuntu on a samsung chromebook18:45
LibertyOrDeathHeyyy19:36
LibertyOrDeathIs anyone here?19:36
Unit19310 seconds?19:37
histono19:41
histooh he left in 10 seconds lol19:41
histoWhy is this channel here btw?19:41
histoIsn't #ubuntu sufficient?19:42

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!