-
February 25th, 2005, 02:38 AM
#11
Senior Member
oh, whilst were adding scripts that do our job for us...
apt-get update <- put that in your cron.daily directory ... The amount of times ive forgotten to run that file installed a program only to realise there is an update ....
lsof is also good for listing open files (this includes devices etc very useful for programs hogging a device)
lsof | grep /dev/dsp
I have to close some programs via that method because they lock my DSP
-
February 25th, 2005, 07:51 AM
#12
*su - root - If you just type su, not everything is exported, i.e. shell aliases and ls colors
You shall no longer take things at second or third hand,
nor look through the eyes of the dead...You shall listen to all
sides and filter them for your self.
-Walt Whitman-
-
February 25th, 2005, 09:04 PM
#13
Here's a way to use already existing command features that I've discovered some are not aware of:
Doing just a cd without syntax behind it will automagically redirect you back to the home directory of whatever user you happen to be logged in as.
test@/etc/dvd/> cd
Logged in as test will bring you back to /home/test
Logged in as test and under su root, will bring you back to /root
\"It is not the strongest of the species that survive, nor the most intelligent, but the one most responsive to change.\"
- Charles Darwin
-
March 3rd, 2005, 10:23 PM
#14
Originally posted here by Lansing_Banda
*su - root - If you just type su, not everything is exported, i.e. shell aliases and ls colors
or just,
[code]su -[code]
Hmm...theres something a little peculiar here. Oh i see what it is! the sentence is talking about itself! do you see that? what do you mean? sentences can\'t talk! No, but they REFER to things, and this one refers directly-unambigeously-unmistakably-to the very sentence which it is!
-
March 4th, 2005, 02:50 AM
#15
the most annoying part about su is that it doesn't even export the PATH.
Anyway, since I like this thread so much, here's my contribution (to tack onto Guardian Alpha, if I may):
will get you back to your previous working directory
example:
Code:
[root@me /]cd /usr/bin
[root@me bin]# cd /etc
[root@me etc]# cd -
/usr/bin
[root@me bin]#
it's a real time saver.
ik
Alright Brain, you don\'t like me, and I don\'t like you. But let\'s just do this, and I can get back to killing you with beer.
-- Homer S.
-
March 4th, 2005, 03:05 AM
#16
a few time savers:
pgrep
pkill
zcat
zmore
zgrep
also, someone mentionned lsof, which has fstat for equivalent in bsd...
Ammo
Credit travels up, blame travels down -- The Boss
-
April 24th, 2005, 01:08 PM
#17
Junior Member
Something that I find very useful is the screen command.
It comes in handy when you want to SSH back to the same session on a box. For example if you're running some kind of client eg an IRC client, usually when you close the SSH session you won't be able to go back to your IRC screen. The program screen solves this. Here's an example:
Code:
screen -t irc Bitchx
Now you're running Bitchx on a new terminal. To get back to your original terminal you press ^ad (Control+A, then D). The D stands for Detach.
You can now close your SSH session while the Bitchx client still runs. When you SSH in again, run the command
And voila you're looking at the same Bitchx client you left running before.
-
April 26th, 2005, 07:29 AM
#18
Junior Member
Backgrounding ssh port forwarders, ability to use same terminal setting up multiple forwarders. This way you don't accidently close your term and thus killing your forwarder.
ssh -f -N -L 8080:123.123.123.123:80 username@hostname.com
-
April 26th, 2005, 01:58 PM
#19
Just to get back on my own post Why use tar instead of move or copy?
mv/cp screws up symlinks, tar doesn't. That's the reason I had problems
Oliver's Law:
Experience is something you don't get until just after you need it.
-
April 26th, 2005, 02:42 PM
#20
Junior Member
I would still have to tend to either use scp or rsync w/ ssh encryption when copying files/dirs between hosts. But again its all more of a personnal opinion. Theres 50 different ways of doing it on unix
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|