Sponsor Advertisements help keep UGN Security Online.
Sponsor Advertisements help keep UGN Security Online.
Want to earn prizes for clicking online advertisements? Join Rewards1.com.
|
|
|
#16478 - 02/19/04 04:00 PM
Bash Tips and Tricks
|
nobody
Registered: 03/02/02
Posts: 815
Loc: Ann Arbor
|
Post your favorite tips and tricks that help make your life in the shell easier.
for i in ls *gz ; do tar -zxvf $i ; done
decompresses all the archives in a directory.
|
|
Top
|
|
|
|
Sponsor Advertisements help keep UGN Security Online.
Sponsor Advertisements help keep UGN Security Online.
|
|
#16484 - 02/20/04 02:53 AM
Re: Bash Tips and Tricks
|
UGN Member
Registered: 09/25/02
Posts: 390
Loc: Asheville, NC
|
su and sudo ....they are the biggest time savers in the universe
_________________________
"The secret to creativity is knowing how to hide your sources." -Albert Einstein Tech Ninja Security
|
|
Top
|
|
|
|
#16486 - 02/20/04 03:25 AM
Re: Bash Tips and Tricks
|
nobody
Registered: 03/02/02
Posts: 815
Loc: Ann Arbor
|
ok I wasnt really looking for a description of bash commands... more like combinations of them. I think there is already a post here containing basic bash commands. *rm -rf = remove recurisive and force
dmesg | grep [device name]
outputs boot hardware information about a specific device useful for troubleshooting kernel problems. If the device is CD it will spit out info about your CD roms if you use hd as the device it will tell you about your harddrives
cat /var/log/XFree86.0.log | grep EE
outputs any errors from your xconfig log. makes troubleshooting X hella easier or switch EE with WW to view warnings.
|
|
Top
|
|
|
|
#16487 - 03/02/04 02:02 AM
Re: Bash Tips and Tricks
|
Member
Registered: 06/05/02
Posts: 207
Loc: US
|
i always find myself using "locate [file] | grep [bin|png]" or whatever file i'm looking for usually either when i'm looking for icons to use i'll do like "locate ethereal | grep png" or when trying to find where a program runs from, "locate mysql | grep bin" enormous timesavers just b/c i don't pay as much attention as i should when i install stuff. well, i make sure i install it right, but about 4 hours later i forget where that was, lol and of course, ps -aux | grep [program name] speaking of which, i'm trying to find a way to pipe a process id into kill....but i can't figure it out. kill always comes back with an error everytime i try. i figure it'd be a huge timesaver if i can just write up a shell script where i just type in like "slackill [program]" and by going through ps and grep and cut and kill....it'll kill the process for me//
_________________________
Unbodied unsouled unheard unseen Let the gift be grown in the time to call our own Truth is natural like a wind that blows Follow the direction no matter where it goes Let the truth blow like a hurricane through me
|
|
Top
|
|
|
|
#16489 - 03/02/04 09:58 AM
Re: Bash Tips and Tricks
|
Community Owner
   
Registered: 02/28/02
Posts: 7192
Loc: Portland, OR; USA
|
|
|
Top
|
|
|
|
|
Registered: 03/01/02
Posts: 505
|
|
2198 Members
46 Forums
24780 Topics
59950 Posts
Max Online: 1567 @ 04/25/10 10:20 AM
|
|
|
0 registered (),
313
Guests and
273
Spiders online. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|