blake | good 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 | ||
rowen132 | hello | 02:07 |
=== zz_jackyalcine is now known as jackyalcine | ||
iggy19 | hey all | 02:23 |
iggy19 | trying 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 |
inzaneGOD | hi | 02:24 |
iggy19 | rather - copy them, not move. | 02:24 |
iggy19 | anzaneGOD: howdy | 02:24 |
inzaneGOD | how to chache specific website in squid 3.0? , help me guys, please | 02:25 |
iggy19 | erk *inzaneGOD: ^^ | 02:25 |
inzaneGOD | hi iggy.. | 02:25 |
inzaneGOD | ? :-* | 02:26 |
=== jackyalcine is now known as zz_jackyalcine | ||
=== zz_jackyalcine is now known as jackyalcine | ||
inzaneGOD | ...*... | 02:29 |
inzaneGOD | how to chache specific website in squid 3.0? , help me guys, please | 02:30 |
iggy19 | I'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 |
iggy19 | if 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 error | 02:43 |
iggy19 | TIA for any insight | 02:43 |
tsimpson | that's exactly what you told it, /dirone/*jpg is interpreted by the shell and expands to multiple arguments to cp | 02:51 |
iggy19 | so, any tips on how to copy files matching a wildcard recursively out of a whole directory tree? | 02:55 |
iggy19 | tsimpson: thanks for the reply! | 02:55 |
tsimpson | if 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 files | 02:56 |
tsimpson | the 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 file | 02:57 |
iggy19 | and 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 one | 02:57 |
tsimpson | find is always recursive unless you say "-maxdepth 1" | 02:57 |
iggy19 | tsimpson: thank you very much. have been banging my head for almost an hour and feeling very stoopid | 02:58 |
tsimpson | once you find find, you'll find you use it often :) | 02:58 |
iggy19 | using the "+" option is faster, because it is not calling cp 10,000 times? | 02:59 |
tsimpson | yeah | 02:59 |
=== jackyalcine is now known as Jacky_ | ||
iggy19 | kewl | 02:59 |
tsimpson | but obviously you need a command that can take many arguments, cp is fine though | 03:00 |
iggy19 | I just tried it, and it says I am missing an argument to -exec | 03:03 |
iggy19 | I did modify your commandline to include "-exec cp -i '{}' /dir_two/ | 03:03 |
tsimpson | hmm | 03:09 |
iggy19 | have been messing with it, and is consistently telling me "find: missing argument to `-exec'" | 03:10 |
tsimpson | iggy19: seems fine wants {} to be at the end, "-exec cp -i -t /dir_two/ '{}' +" should work | 03:10 |
iggy19 | hmmm wil try | 03:11 |
iggy19 | man page says -exec COMMAND {} + | 03:11 |
tsimpson | yeah | 03: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 | ||
geirha | iggy19: 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 limit | 06:58 |
=== mysteriousdaren is now known as mysteriousdarren | ||
iggy19 | geirha: a chunk of that went over my head, but I really appreciate your willingness to help! | 07:16 |
iggy19 | I think I might be hitting max-args in another situation right now | 07:17 |
iggy19 | mv /dir-one/* /dir-two/ results in "Argument list too long" | 07:17 |
iggy19 | using my new friend "find" to send those files to mv in chunks by using find -name '*' | 07:22 |
geirha | http://mywiki.wooledge.org/BashFAQ/095 shows some ways to work around that | 07:22 |
geirha | -name '*' is pointless. Might as well remove it. You're saying "Out of all files, pick all files" | 07:26 |
iggy19 | yes | 07:26 |
iggy19 | using it only to send batches to mv to prevent exceeding max args | 07:26 |
iggy19 | seems to be working | 07:26 |
geirha | find /dir-one/ ! -name dir-one -prune -exec sh -c 'mv "$@" /dir-two/' _ {} + | 07:27 |
iggy19 | sorry, 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 |
iggy19 | Can't spend an hour researching best way to do each step | 07:29 |
geirha | the -prune there avoids recursing. It's a bit magical. | 07:29 |
geirha | Hm. You didn't go the ddrescue route I take it | 07: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 it | 07:31 |
geirha | you risk losing files with that | 07:32 |
iggy19 | I used photorec to recover the deleted files - it was an ntfs partition on an external drive | 07:32 |
iggy19 | please explain risk of file loss | 07:33 |
geirha | if 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 other | 07:33 |
geirha | you can add -n (portable) or --backup=numbered (GNUism) to avoid it. | 07:34 |
iggy19 | I 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 process | 07:34 |
geirha | yes, that's probably right | 07:35 |
iggy19 | --backup=numbered increments the filename for duplicates as it copies them? | 07:36 |
iggy19 | I saw that in some of the man pages, but didn't take the time to understand it | 07:36 |
geirha | yes, you get bla.txt.~1~ bla.txt.~2~ etc | 07:36 |
iggy19 | ^^ not so great to give them back to an unsavvy windows user who expects .extensions to rule the world | 07:37 |
geirha | Well, you'd just look for them afterwards, and rename them manually | 07:38 |
iggy19 | ^^ FUN! | 07:38 |
geirha | Typically, there won't be that many, if any at all. Few enough to handle manually quick enough. | 07:39 |
iggy19 | I 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 any | 07:40 |
iggy19 | I am trying to plan my operations to miminize both manual work and using commands I don't already grok, as much as possible | 07:43 |
=== jackyalcine is now known as Jacky_ | ||
=== Jacky_ is now known as jackyalcine | ||
=== jackyalcine is now known as zz_jackyalcine | ||
DejaVu | Hello. 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? Thanks | 16:37 |
geirha | DejaVu: That's because the terminal killed your compiz-decorator --replace when you killed it | 16:38 |
DejaVu | geirha and how do fix that? | 16:38 |
geirha | DejaVu: 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 |
DejaVu | geirha: compiz-decorator --replace & disown | 16:41 |
DejaVu | like this? | 16:41 |
geirha | yes | 16:41 |
geirha | Now, 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 |
geirha | another way is to simply exit the shell instead of closing the terminal. bash disowns its background jobs on exit; leaving them running. | 16:43 |
DejaVu | geirha: it didn't do any good | 16:45 |
geirha | Well, that was a shell/terminal lesson. As for compiz-decorator crashing in the first place, that's a tougher one. | 16:47 |
geirha | Have you modified any compiz settings? | 16:47 |
DejaVu | nope, it happened after update | 16:47 |
geirha | Did you log out or reboot after the update? | 16:49 |
DejaVu | reboot | 16:49 |
geirha | Hm. Sounds like the updates might have introduced or triggered a bug then | 16:52 |
DejaVu | thanks for your time anyways | 16:53 |
=== histo2 is now known as histo | ||
donalcorr | hi, can anyone assist with an installtion of ubuntu on a samsung chromebook serirs 5 | 18:42 |
donalcorr | hi, has anyone experience of installing ubuntu on a samsung chromebook | 18:45 |
LibertyOrDeath | Heyyy | 19:36 |
LibertyOrDeath | Is anyone here? | 19:36 |
Unit193 | 10 seconds? | 19:37 |
histo | no | 19:41 |
histo | oh he left in 10 seconds lol | 19:41 |
histo | Why is this channel here btw? | 19:41 |
histo | Isn't #ubuntu sufficient? | 19:42 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!