Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Application Discovery Thread [formerly: app that does this?]
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... 8, 9, 10 ... 15, 16, 17  Next  
Reply to topic    Gentoo Forums Forum Index Off the Wall
View previous topic :: View next topic  
Author Message
wrex
n00b
n00b


Joined: 01 May 2003
Posts: 26
Location: San Jose, CA

PostPosted: Fri Jan 07, 2005 10:50 pm    Post subject: simple batch scheduling with "at" Reply with quote

roothorick wrote:

Code:
# cat << EOF > /etc/cron.daily/reboot
> #!/bin/bash
> reboot
> rm /etc/cron.daily/reboot
> EOF



Scheduling one-shot commands or batch scripts like this is much simpler (and more flexible) with "at". Simply "emerge sys-apps/at".

The funny thing is that I think "at" predates cron. I know people used to schedule "recursive" at jobs that reschedule themselves as another at job as the last step of the script. They did this because they didn't have any other way of scheduling regularly occuring jobs (like cron). Here you're going the other way: using cron to act like at. :-)

The at utility is one of several standard unix admin tools that I consider indispensable. I was surprised not to find it already installed when I built my first gentoo system (the installation guide tells you to install a cron package, but none of these include at).
Back to top
View user's profile Send private message
tv
n00b
n00b


Joined: 08 Oct 2004
Posts: 15
Location: Stuttgart / Europe

PostPosted: Mon Jan 10, 2005 8:49 pm    Post subject: Reply with quote

as i dont like xdm&co ive got this one:
Code:
alias xinit='xinit &>~/.xinit.log&exit'


and as i use vim as my default pager i like this one:
Code:
nnoremap <C-c> :q<cr>
Back to top
View user's profile Send private message
libero
Tux's lil' helper
Tux's lil' helper


Joined: 26 Mar 2004
Posts: 86
Location: Tokyo

PostPosted: Fri Mar 11, 2005 8:53 am    Post subject: use history and exclamation Reply with quote

hi Gentoos:

I use it so much, I nearly forgot about it, but didn't see it mentioned anywhere in this list. So I'll add my tip here.

Never forget the lessons of history! Saves time on the command line.

Code:

#!/bin/zsh

# Interactive Enviroment
SAVEHIST=500
HISTSIZE=800
HISTFILE=~/.zsh_history

export SAVEHIST HISTFILE HISTSIZE


If your .zshrc contains lines like the above, then your past 500 commands issued are saved in the HISTFILE and carried over to your next login; and the current working buffer of command history is set to 800.

So in the course of normal work / play / computing, I issue this command:
Code:
 
history -40

which reports your most recent commands in the current shell, say like this sample:
Code:

  510  ls -l
  511  cd logs
  512  ls -l
  513  find . -name "check_some_*log" -print |xargs gzip
  514  who
  515  find . -name "check_other_*log" -print |xargs gzip
  516  cal 2006
  517  cd ..
  518  ls


I happen to have a fondness for command #515 (or maybe it's long and I just don't want to type it again.) Cool, now I can issue
Code:

!515

which gets interpreted as, and executes this again:
Code:

find . -name "check_other_*log" -print |xargs gzip

Also use
Code:

!!

for the immediately preceding command. But I sometimes find just executing in sequence is really handy:
Code:


libero@kappa-520%!480
.... stuff happens ...
libero@kappa-521%!481
.... other stuff happens ...
libero@kappa-522%!480
.... stuff happens ...
libero@kappa-523%!481
...  etc.  ...


Another cool thing about this history is that you can sync all your shells. By logging out of all your shells, the last shell gets saved in HISTFILE and then starting up some new shells, they all begin with the same history, and can easily begin using that command you like, in any and all of the new shells. Of course, if you like it that much, there are things called "alias" or "shell script" you might want to try.
Back to top
View user's profile Send private message
martinus
n00b
n00b


Joined: 13 Jul 2002
Posts: 50

PostPosted: Wed Mar 30, 2005 2:02 pm    Post subject: history repeating Reply with quote

I always set my bash history to an insanely high number. In fact my .bash_history contains commands executed from a year ago.
in .bashrc:
Code:
export HISTSIZE=1000000

When executing commands, I always press Ctrl-R for incremental reverse search and start typing what I want to do. Chances are high that at some point during the last year I have used the same or a very similar command :-)

Whenever I do a fresh install of gentoo on a computer, I copy my old .bash_history file from the other PC.


Last edited by martinus on Mon Sep 19, 2005 3:47 pm; edited 1 time in total
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3381

PostPosted: Mon Sep 19, 2005 3:12 pm    Post subject: MyPasswordSafe.ebuild Reply with quote

dkaplowitz wrote:
tactless wrote:
Here's another, more useful one:
I manage my passwords in a plaintext file on my computer. The catch is that it's encrypted with gpg. To easily edit, I use the gnupg vim plugin (available at vim.org).


That's pretty cool, it never occured to me to do it that way, nice too if you're working solely in the console.

For X I've been using an app called MyPasswordSafe that is open source and (i believe) gpl'ed. (I noticed the site wasn't loading this AM, probably doing some maintenance) It has a nice interface for storing passwords, easily copies them to your clipboard, and stores them in a blowfish encrypted .dat file that you can x-fer from machine to machine.

You can also x-fer the .dat to a Windows box running the Windows equivalent of this app, called: passwordsafe


At the MyPasswordSafe site they now have an ebuild. But it's just that, an ebuild. No Manifest, no digest, etc. I tried tucking it into my overlay at /usr/local/portage/app-admin/MyPasswordSafe/... but it doesn't work, I presume because of the aforementioned missing files. A look through emerge and ebuild man pages suggests a way to build at least the digest, but it failed, nor was there a way to build the Manifest.

What do I do with a naked ebuild?
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
oliver
Apprentice
Apprentice


Joined: 25 Jun 2003
Posts: 170

PostPosted: Tue Oct 11, 2005 8:48 pm    Post subject: Re: MyPasswordSafe.ebuild Reply with quote

depontius wrote:

At the MyPasswordSafe site they now have an ebuild. But it's just that, an ebuild. No Manifest, no digest, etc. I tried tucking it into my overlay at /usr/local/portage/app-admin/MyPasswordSafe/... but it doesn't work, I presume because of the aforementioned missing files. A look through emerge and ebuild man pages suggests a way to build at least the digest, but it failed, nor was there a way to build the Manifest.

What do I do with a naked ebuild?


I think you need to run
Code:
# ebuild /path/to/portdir_overlay/file.ebuild digest

and the digest/Manifest/etc will get created for you... then emerge as normal
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3381

PostPosted: Tue Oct 11, 2005 11:14 pm    Post subject: Re: MyPasswordSafe.ebuild Reply with quote

oliver wrote:
depontius wrote:

At the MyPasswordSafe site they now have an ebuild. But it's just that, an ebuild. No Manifest, no digest, etc. I tried tucking it into my overlay at /usr/local/portage/app-admin/MyPasswordSafe/... but it doesn't work, I presume because of the aforementioned missing files. A look through emerge and ebuild man pages suggests a way to build at least the digest, but it failed, nor was there a way to build the Manifest.

What do I do with a naked ebuild?


I think you need to run
Code:
# ebuild /path/to/portdir_overlay/file.ebuild digest

and the digest/Manifest/etc will get created for you... then emerge as normal


Long done, but thanks, anyway.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
funeagle
Tux's lil' helper
Tux's lil' helper


Joined: 05 Aug 2003
Posts: 102
Location: London

PostPosted: Thu Mar 09, 2006 9:11 am    Post subject: Reply with quote

In bash if you want to clear the current console (and you are in session-1) then run a command which will print out something then do it again and again this would be useful

Code:
clear; dcop konsole-$PPID session-1 clearHistory; somecommand



of course then use the history with the arrow up key.

(for dcop konsole-* session-1 clearHistory the credit goes to JRV)
Back to top
View user's profile Send private message
brot
Guru
Guru


Joined: 06 Apr 2004
Posts: 322

PostPosted: Thu Mar 09, 2006 7:20 pm    Post subject: ... Reply with quote

one thing i really like about bash is the tab-comletion. But thats not all ;)
Imagine you typed a lot (a loooot) of commands.

Then you want to edit a file you edited some time ago. You know this command is in the history, but you are too lazy to look at all the other things you got in your history.
So you type in: nano
- and then press the page up button. It will show you everything you typed in beginning with nano.

This is very usefull, i think.

Thanks for all the other tips here...
brot
Back to top
View user's profile Send private message
slick
Bodhisattva
Bodhisattva


Joined: 20 Apr 2003
Posts: 3495

PostPosted: Fri Mar 10, 2006 10:49 am    Post subject: Reply with quote

small, but my absolute favorit:
Code:
alias nn="nano -w -T4"
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Fri Mar 10, 2006 6:42 pm    Post subject: Reply with quote

one of the first things i do on a new machine

instead of always typing nano -w myfile
uncomment inside /etc/nanorc
Code:
# set nowrap


@slick: additionally in /etc/nanorc
Code:
set tabsize 4

_________________
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself
Back to top
View user's profile Send private message
Xk2c
Apprentice
Apprentice


Joined: 17 Jul 2004
Posts: 240

PostPosted: Sat Mar 11, 2006 9:49 pm    Post subject: Re: history repeating Reply with quote

martinus wrote:
I always set my bash history to an insanely high number. In fact my .bash_history contains commands executed from a year ago.
in .bashrc:
Code:
export HISTSIZE=1000000



This is realy big. Remenber this will get loaded everytime when a shell opens!
A waste of memory.
Instead you could use:
Code:
export HISTCONTROL=ignoredups

To prevent instructions you have used twice in a row to show up also twice in .bash_history.
e.g.
if you do ls -l and then again ls -l only one will show up in history.

an other bash-feature to use is:
Code:
export HISTIGNORE="&:[bf]g:exit:df:cd:h:l:ll:la:au:ad:mounthd:htop:screen:mutt:mc"

This will prevent all listed instructions from ever show up in history. I use this for my "every-day-easy-to-remember-instructions".

Only with this two my history was melting noticeable.

An other thing about history. e.g. you open up three session in konsole or gnome-terminal do some work and then close them again.
Only the last one will write ~/.bash_history (the others will do also, but will get overwritten when next tab is closed).

martinus wrote:
When executing commands, I always press Ctrl-R for incremental reverse search and start typing what I want to do. Chances are high that at some point during the last year I have used the same or a very similar command :-)


put this in /etc/inputrc:
Code:
# alternate mappings for "page up" and "page down" to search the history
"\e[5~": history-search-backward
"\e[6~": history-search-forward


an other hint with /etc/inputrc:
Code:
# Adding this to your /etc/inputrc or ~/.inputrc will result in a character
# being appended to any file-names returned by completion, in much the same
# way as ls -F works.
set visible-stats on

# If you have this in your /etc/inputrc or ~/.inputrc, you will no longer
# have to hit the <Tab> key twice to produce a list of all possible completions.
# A single <Tab>  will suffice.
set show-all-if-ambiguous on

# Completed names which are symbolic links to
# directories have a slash appended.
set mark-symlinked-directories on



side note
my most favourite alias:
Code:
alias v='vim'

and
Code:
alias dum='du -h --max-depth=1 -k | sort -n'

_________________
useful Xterm, Aterm and RXVT-Unicode features
Back to top
View user's profile Send private message
pteppic
l33t
l33t


Joined: 28 Nov 2005
Posts: 781

PostPosted: Sat Mar 11, 2006 10:14 pm    Post subject: Reply with quote

I've found some apps don't like working through squid (svn for example)
Instead of deleating the redirect rule to allow it to work I have this
Code:
iptables -A PREROUTING -i eth1 -p tcp -m tcp --dport 8181 -j DNAT --to-destination :80
after the redirect rule, then use
Code:
svn co http:/my/svn/host:8181/some_cool_source
and iptables routes around squid for you.
Back to top
View user's profile Send private message
ElroyJetson
n00b
n00b


Joined: 16 Mar 2004
Posts: 9
Location: King of Prussia (Philadelphia) PA USA

PostPosted: Thu Mar 16, 2006 5:02 pm    Post subject: Re-installing Linux, move /* to /OLD Reply with quote

I used this technique successfully when migrating from Mandrake to Gentoo a couple years ago. Used it again when re-installing Gentoo from the 2006.0 Live CD to overcome a mess. This requires you do not re-format your partition!

0. Back up important data! (files, databases, etc.)
1. Boot Install CD or Live CD
2. mount/dev/hdx /mnt/gentoo (that's your root partition)
3. mkdir /mnt/gentoo/OLD (or a clever name)
4. mv /mnt/gentoo/* /mnt/gentoo/OLD
5. umount /mnt/gentoo
7. If you use a separate boot partition, you must do the same there.
8. Now install Gentoo. Don't change or force a format of your partitions!

If the new install wasn't complete (stumped on an issue or needed to get full machine back, then Boot of the CD and move the new / files to /NEW and /OLD files to /. If necessary you should restore the /boot partition the same way and re-run grub-install if necessary.

This technique did save me as when I rebooted after install, I couldn't bring up the ethernet card. Since I needed to start work, I switched back to OLD to work. Switched back to NEW to finish up (the card came up as eth1 instead of eth0, but then switched back to eth0. whatever.)

The other benefit is having your OLD working full install, config files, and home directories available when you come up. I moved the /home dirs back from OLD when complete. Today's larger hard drives allow this to be possible. Also note that your database files should be backed up on the old software and restored on the new installation as re-using the same db data directories may not work. Also Qmail mail queues have to be tweaked as they rely on inode naming if they have physically moved.

Great ideas on this thread! Thanks!!
Back to top
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2858
Location: Bay Area, CA

PostPosted: Fri Mar 17, 2006 10:08 pm    Post subject: x86 vs. ~x86 Reply with quote

so, there is always this battle and confusion about whether to run ~x86 or x86. portage allows package specific keywords in /etc/portage/package.keywords.

hey, everybody knows that one!!!

yeah, but you probably don't know that the syntax allows "-" in front of the keyword to exclude it. e.g. I run my system with ACCEPT_KEYWORDS=~x86 in /etc/make.conf. But how do I safegaurd my critical packages like baselayout and udev: I just add them to package.keywords with "-~x86". So, I have a full ~x86 consistent system but major breakers like baselayout and udev are built x86 always. Kinda inversion effect.

so, just weigh how many ~x86 packages you use in package.keywords vs. total no of installed packages. And go for the inversion.
Back to top
View user's profile Send private message
NotQuiteSane
Guru
Guru


Joined: 30 Jan 2005
Posts: 481
Location: Klamath Falls, Jefferson, USA, North America, Midgarth

PostPosted: Wed Mar 29, 2006 9:34 am    Post subject: Reply with quote

Actually just discovered this one by accident:

start screen session.

load links2

choose hyperlink

press escape and goto "link" menu or press right mouse button

Choose "open in new window"

^a ^n, enter links as wished, then view at leisure.

no more following link A 6 levels down, then having to backtrack because you also want to view link D

NQS
_________________
These opinions are mine, mine I say! Piss off and get your own.

As I see it -- An irregular blog, Improved with new location

To delete French language packs from system use 'sudo rm -fr /'
Back to top
View user's profile Send private message
dethmetaljeff
n00b
n00b


Joined: 16 Sep 2004
Posts: 4

PostPosted: Wed Apr 05, 2006 9:30 pm    Post subject: Reply with quote

I seem to be grepping history quite a bit, so I setup an alias to save myself some typing.

Code:
alias hgrep="history | grep"
Back to top
View user's profile Send private message
SimonKellett
Tux's lil' helper
Tux's lil' helper


Joined: 17 Dec 2003
Posts: 88
Location: Darmstadt, Germany

PostPosted: Thu Apr 06, 2006 7:03 am    Post subject: Reply with quote

dethmetaljeff wrote:
I seem to be grepping history quite a bit, so I setup an alias to save myself some typing.

Code:
alias hgrep="history | grep"


Is that better than ^R ? ("^R ls" to find the last command containing "ls", then keep pressing ^R to match the next one backwards).
Back to top
View user's profile Send private message
opentaka
l33t
l33t


Joined: 18 Feb 2005
Posts: 840
Location: Japan

PostPosted: Sun Jul 30, 2006 4:00 pm    Post subject: Reply with quote

1.have these in your .bash_profile or .zshenv
Code:

alias emerge='sudo emerge -av'
alias vip='sudo vi /etc/portage/package.keywords'
alias ls="ls --color=auto"
alias c='clear'


2. try unstable packages, it really eats your time playing around with them :)

3. screen with irssi.

4. when you startx from console, you startx & and execute vlock.

OR, you screen startx and deatach it :)
_________________
"Being defeated is often a temporary condition. Giving up is what makes it permanent" - Marilyn vos Savant
Back to top
View user's profile Send private message
Omega21
l33t
l33t


Joined: 14 Feb 2004
Posts: 788
Location: Canada (brrr. Its cold up here)

PostPosted: Mon Aug 21, 2006 11:27 pm    Post subject: Application Discovery Thread [formerly: app that does this?] Reply with quote

Hi there,
I was thinking that this thread would be a great place to ask questions about different applications.
For example, if you wanted to know of an application that transfers songs to an iPod, you can ask here and people might reply with gtkPod.
_________________
iMac G4 1GHz :: q6600 //2x 500GB//2GB RAM//8600GT//Gentoo :: MacBook Pro//2.53GHz


Last edited by Omega21 on Tue Aug 22, 2006 3:59 am; edited 1 time in total
Back to top
View user's profile Send private message
Omega21
l33t
l33t


Joined: 14 Feb 2004
Posts: 788
Location: Canada (brrr. Its cold up here)

PostPosted: Mon Aug 21, 2006 11:28 pm    Post subject: Reply with quote

I'll start:

I need an application that downloads internet radio streams to your computer. The only catch is that I need it to seperate the songs into different tracks, based on the name of the song that is sent out by the internet radio. Any ideas?
_________________
iMac G4 1GHz :: q6600 //2x 500GB//2GB RAM//8600GT//Gentoo :: MacBook Pro//2.53GHz
Back to top
View user's profile Send private message
aidy
l33t
l33t


Joined: 07 Apr 2005
Posts: 915

PostPosted: Mon Aug 21, 2006 11:29 pm    Post subject: Reply with quote

/me needs that sit too
Back to top
View user's profile Send private message
deadstar
Guru
Guru


Joined: 02 Nov 2004
Posts: 319
Location: England

PostPosted: Mon Aug 21, 2006 11:34 pm    Post subject: Reply with quote

Code:

media-sound/streamripper
      Latest version available: 1.60.10
      Latest version installed: [ Not Installed ]
      Size of files: 678 kB
      Homepage:      http://streamripper.sourceforge.net/
      Description:   Extracts and records individual MP3 file tracks from shoutcast streams
      License:       GPL-2


Enjoy.
_________________
Hysteriagaming.co.uk is now DOT COM! New design, forum, articles, the works! http://www.hysteriagaming.com

(\ /)
(O.o)
(> <)
This is Bunny. Copy Bunny into your signature to help him on his way to world domination
Back to top
View user's profile Send private message
Omega21
l33t
l33t


Joined: 14 Feb 2004
Posts: 788
Location: Canada (brrr. Its cold up here)

PostPosted: Mon Aug 21, 2006 11:36 pm    Post subject: Reply with quote

deadstar wrote:
Code:

media-sound/streamripper
      Latest version available: 1.60.10
      Latest version installed: [ Not Installed ]
      Size of files: 678 kB
      Homepage:      http://streamripper.sourceforge.net/
      Description:   Extracts and records individual MP3 file tracks from shoutcast streams
      License:       GPL-2


Enjoy.


Forgive my n00bness but what is a shoutcast? Is it basically just internet radio?
_________________
iMac G4 1GHz :: q6600 //2x 500GB//2GB RAM//8600GT//Gentoo :: MacBook Pro//2.53GHz
Back to top
View user's profile Send private message
deadstar
Guru
Guru


Joined: 02 Nov 2004
Posts: 319
Location: England

PostPosted: Mon Aug 21, 2006 11:38 pm    Post subject: Reply with quote

My request:

I need a Macromedia Flash editor. I've found many text-based actionscript compilers, but nothing GUI based at all. The only non Adobe/Macromedia tool I can find is Swish, but that's for Windows only.

Crossover office handled it great, but I'm no longer subscribed, and MX 2004 isn't supported.
_________________
Hysteriagaming.co.uk is now DOT COM! New design, forum, articles, the works! http://www.hysteriagaming.com

(\ /)
(O.o)
(> <)
This is Bunny. Copy Bunny into your signature to help him on his way to world domination
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Off the Wall All times are GMT
Goto page Previous  1, 2, 3 ... 8, 9, 10 ... 15, 16, 17  Next
Page 9 of 17

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum