Darkelve Posted July 7, 2003 Report Share Posted July 7, 2003 Welcome......try ll :wink: Why don't you try lsd :shock: Quote Link to comment Share on other sites More sharing options...
Gowator Posted July 7, 2003 Report Share Posted July 7, 2003 Hey, I followed your instructions and tried lsd but all it did was make my monitor go all strange and start flashing colours and shapes at me. If this wasn't enough it now does the same thing from time to time even when I don't ussue the command ??? Whats going on ? Erm sorry if I drifted off topic .... Quote Link to comment Share on other sites More sharing options...
tyme Posted July 7, 2003 Report Share Posted July 7, 2003 Hey, I followed your instructions and tried lsd but all it did was make my monitor go all strange and start flashing colours and shapes at me. If this wasn't enough it now does the same thing from time to time even when I don't ussue the command ??? Whats going on ? :lol: watch out for those Low Sugar Diet stickers there, Gowator ;-) Quote Link to comment Share on other sites More sharing options...
Darkelve Posted July 7, 2003 Report Share Posted July 7, 2003 Hey, I followed your instructions and tried lsd but all it did was make my monitor go all strange and start flashing colours and shapes at me. If this wasn't enough it now does the same thing from time to time even when I don't ussue the command ??? Whats going on ? Erm sorry if I drifted off topic .... Strange... it only lists directories for me. Which version are you using ? Quote Link to comment Share on other sites More sharing options...
tyme Posted July 7, 2003 Report Share Posted July 7, 2003 Strange... it only lists directories for me. Which version are you using ? You do realize he's joking, correct? Quote Link to comment Share on other sites More sharing options...
Gowator Posted July 7, 2003 Report Share Posted July 7, 2003 You do realize he's joking, correct? I certainly hope so.... Or perhaps its a bit deeper.... perhaps I should have checked the MD5 sum when I got it :wink: Quote Link to comment Share on other sites More sharing options...
Darkelve Posted July 7, 2003 Report Share Posted July 7, 2003 Strange... it only lists directories for me. Which version are you using ? You do realize he's joking, correct? I know, I was just playing along. I still think it's a funny command though :P Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted October 17, 2003 Author Report Share Posted October 17, 2003 I was just thinking if I could find a way to list what packages require a certain package that I have installed, so I wrote a little dirty script to check: #!/bin/sh TEST=$(rpm -qa --queryformat "%{NAME}n" | grep $1) || echo "No package named $1 is installed" for name in $TEST do echo "Installed RPM $name is needed by:" rpm -q --whatrequires $name echo "" done exit 0 You invoke it with what you think the name of the package is, no version number or anything, like this (say you name the script requires and put it in /usr/bin and chmod +x it): [root@omarserenity omar][root@omarserenity omar]# requires sylpheed Installed RPM sylpheed-claws-ghostscript_viewer-plugin is needed by: no package requires sylpheed-claws-ghostscript_viewer-plugin Installed RPM sylpheed-claws-image_viewer-plugin is needed by: no package requires sylpheed-claws-image_viewer-plugin Installed RPM sylpheed-claws-devel is needed by: no package requires sylpheed-claws-devel Installed RPM sylpheed-claws-trayicon-plugin is needed by: no package requires sylpheed-claws-trayicon-plugin Installed RPM sylpheed-claws-mathml_viewer-plugin is needed by: no package requires sylpheed-claws-mathml_viewer-plugin Installed RPM sylpheed-claws-spamassassin-plugin is needed by: no package requires sylpheed-claws-spamassassin-plugin Installed RPM sylpheed-claws is needed by: sylpheed-claws-ghostscript_viewer-plugin-0.9.5claws-4mdk sylpheed-claws-tools-0.9.5claws-4mdk sylpheed-claws-devel-0.9.5claws-4mdk sylpheed-claws-mathml_viewer-plugin-0.9.5claws-4mdk sylpheed-claws-spamassassin-plugin-0.9.5claws-4mdk sylpheed-claws-image_viewer-plugin-0.9.5claws-4mdk sylpheed-claws-trayicon-plugin-0.9.5claws-4mdk Installed RPM sylpheed-claws-tools is needed by: no package requires sylpheed-claws-tools [root@omarserenity omar]# requires blacksabbath No package named blacksabbath is installed It could use a little tweaking. Like maybe list all the matches and let you pick one to test first. Of course aru is gonna come along and show us an easier, better way to do this. Quote Link to comment Share on other sites More sharing options...
simcon Posted October 26, 2003 Report Share Posted October 26, 2003 I've been using Mandrake since mdk8 I think. I've found lots of useful command line programs that I've written into a little book:- lspcidrake lspci -v [in depth pci device list] lsmod ps -ef [dump process list to screen, like 'top' but not continuous] fuser -v /dev/* ifconfig -a [same as 'ipconfig' under Windows] netstat | grep tcp service -s [show current service status] apropos net [search man pages, in this case for all commands that include the word net, very useful] Hope there's something there that you can make use of. The 'apropos' one I found to be like finding the Holy Grail :D Quote Link to comment Share on other sites More sharing options...
alaa Posted October 26, 2003 Report Share Posted October 26, 2003 BTW you can use netstat -t to show tcp connections without having to grep netstat -p also lists the programs responsible for these connections and netstat -n is much faster since it lists IPs numericaly without trying to reverse DNS them netstat -c will let nestat run forever and just refresh the display every few seconds. I usualy want to keep a count of the number of open connections in front of me so I run watch "netstat -tn | wc -l" cheers, Alaa Quote Link to comment Share on other sites More sharing options...
qeldroma Posted November 6, 2003 Report Share Posted November 6, 2003 Ok, now i am on: du: "DiskUsage". Say you want to know how large some directory-structures are... this is it. eject/eject -t: To eject/load a cdrom. Defaults to the first one in alphabetical order. Else you add the /dev/hdX. ntop: same as top, but for network-traffic iptraf: The BEST tool i've found to monitor Network with menues in ncurse to select the wanted options grep: to filter output. A simple "cat /etc/services|grep -i http" will show you all ports concerning http. "|" : this tunnels output to another console-tool, like seen above. ps -ax: shows all processes with applicationname and pid, etc... /proc: You want to know everything about your smart machine like "sysinfo"? Here you are. For every information is a file which is readable (e.g. cpuinfo, filesystems, meminfo, modules, etc...) wget: wanna mirror a http/ftp-directory? "wget -r http://some-url.org/dummy/" will fetch all files in the path "/dummy" on "some-url.org" on your harddisk recursively. /dev/zero: wanna some zeros? Just copy this file to the file you want to fill with zeros. Be aware, it never stopps ;-) Nice way to delete a partition definetely. Just count the zeros with a for-loop until you filled all available bytes. /dev/null: this is a file where nothing is happening, it just eats everything. E.g.: "make bzImage >/dev/null" will copy every compiling-output of make to /dev/null, what means the screen keeps clean. route: shows all network-concerned routes/gateways For what do you need this all? Well, a small example: #!/bin/bash echo "Progress:" CPU=`cat /proc/cpuinfo|grep "model name"|cut -d":" -f2`; MHz=`cat /proc/cpuinfo|grep "MHz"|cut -d":" -f2`; cmdLine=`cat /proc/cmdline`; modules=`cat /proc/modules|cut -d " " -f1`; system=`cat /proc/version`; echo -n "#" echo "##############################">/var/log/sysinfo echo "#### System Informations #####">>/var/log/sysinfo echo "##############################">>/var/log/sysinfo echo >>/var/log/sysinfo echo -n "#" echo "1. You're system is a $CPU with $MHz MHz.">>/var/log/sysinfo echo >>/var/log/sysinfo echo -n "#" echo "2. You're commandline for boot was '$cmdLine'.">>/var/log/sysinfo echo >>/var/log/sysinfo echo -n "#" echo "3. You're OS is '$system'.">>/var/log/sysinfo echo >>/var/log/sysinfo echo >>/var/log/sysinfo echo -n "#" echo "Following all loaded modules with their options:">>/var/log/sysinfo echo -n "#" for module in $modules; do echo "Found Module '$module':">>/var/log/sysinfo modinfo $module >>/var/log/sysinfo echo >>/var/log/sysinfo echo -n "#" done echo echo "finished!" read -p "For results press a key." clear cat /var/log/sysinfo What you'll see is a progress-meter, after that the result. In /var/log/sysinfo is a file with the same contents. To be continued..... Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted February 1, 2004 Author Report Share Posted February 1, 2004 Something I discovered from this post by a user that only has this one post on this board (Zucchini): http://www.MandrakeUsers.org/index.php?sho...indpost&p=89989 Cool. I never knew that. Quote Link to comment Share on other sites More sharing options...
Guest Bratag Posted February 17, 2004 Report Share Posted February 17, 2004 lsof - Damn useful for when you are trying to umount a filesystem and it says it is busy. Also useful for determining what resources a specific program uses. ldd - All those times you get a lib error. ldd the file and see what libs it wants. perhaps it has a hard coded path or perhaps it is using the wrong version of the lib on your system. They can have my CLI when they pry it from my cold dead hands. Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted October 26, 2004 Author Report Share Posted October 26, 2004 Have a process you want to kill but don't know the full name of it and killall <<processname>> doesn't work? ps ax | grep <<processname>> | awk '{print $1}' | xargs kill -9 Quote Link to comment Share on other sites More sharing options...
Guest Hobbletoe Posted November 9, 2004 Report Share Posted November 9, 2004 Having been a Solaris administrator for a number of years, I came up with two commands that I use quite frequently. ps2() { ps -ef | grep -i $1 | grep -v grep; } This allows me to find a process without having to type the whole thing out all of the time. Only 'ps2 process'. The other one is ... watch () { while ps -ef | grep -i $1 | grep -v grep > /dev/null do sleep 5 done echo "*** Watch for $1 completed at `date +"%H:%M:%S"`. ***" } This allows me to kick off a job in the background (say a database import that takes hours), and then I can set a watch for it. 'watch imp &'. When the process is done, it prints out that message for me so that I know that it is done (and when in case I need to know about how long a process took since I might not be looking at the screen when it finishes. I put both of these functions in a script and have it run at the end of /etc/profile. Oh, and if you are wondering why not aliases, we use the Bourne (sh) shell at work that doesn't support aliases. Hobbletoe Clubfoot Mandrake 10.0 Official Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.