-
Handy bash commands for finding out stuff in Linux
# Find CPU specifications
cat /proc/cpuinfo
# What pci cards are installed and what irq/port is used
cat /proc/pci
# Memory information
free
# How is the hard drive partitioned
fdisk /dev/hdXX -l
# How much free drive space
df -h
# Find running kernel version
uname -r
# Find X server version
X -showconfig
# What is the distribution
cat /etc/.product
cat /etc/.issue
cat /etc/issue
cat /etc/issue.net
sysinfo
# For finding or locating files
find
locate
which
whereis
Look at man <command> or info <command> for the flags and options you can use for bash commands.
What have I overlooked? Add your essential informational bash commands/scripts.
-
Or run GKrellm and over half of these will be displayed at all times
-
But gkrellm displays a graphical representation without a lot of specifics.
Then there is gtop, ktop, etc.
I was specific about the command line in the subject as all distros (Mandrake users, double check me) use bash..
Moderators!
-
du
(show disk usage by current directory and all subdirectories) is one of my favorites. Handy for figuring out if it's time to make a backup CD yet
-
Good one. Possibly better if piped to less
du | less
or re-directed to a file
du > diskusage
-
Someone looking for a banning?
GKrellm isn't just a graphical tool...you can configure it to show you the hard numbers also. It's just an option, did I sound negetive at all? I don't think so, There are lots of good suggestions in this thread and the more the better. I use GKrellm for a general view. If I need more detail these are the commands to use.
-
Yep Mandy does use bash.
Two of my faves:
dmesg|less
to find out what went wrong at boot-up
ps -A
to see what's running
We are free to think. We are free to plan. And we are free to do. But once an action has been taken, we are never free from its consequences.
--Russel M. Nelson, apostle.
-
Very good threed here helpfull for newbs like me, keep em coming.
-
1) Find a process id by name
ps -ef |grep -i <plain text>
For example, XCDroast
ps -ef |grep -i xcdroast /* Case Insensitive */
2) See current environment list, or pipe to file
env |more
env > environmentvariablelist.txt
3) Show current userid and assigned groups
id
4) Scan for problems with system, executing a file, etc
tail -f /var/log/message
5) See all command aliases for the current user
alias
6) rpms installed on current system
rpmquery --all |more
rpmquery --all > filenameyouwouldlike.txt
rpmquery --all | grep -i <plaintext> /* find specific rpms with name in them */
hlrguy
-
you are starting a pretty similar thread to this one.
http://www.justlinux.com/forum/showt...threadid=72069
-
Last edited by fancypiper; 02-12-2003 at 03:18 PM.
-
i dont think its too much, i even appreciate it very much!
but you could easily add all these tips into the BIG thread.
(i hope you know which one i mean)
cya
-
Thread? Is someone sewing something?
-
I found these pretty cool.
top -q -d 2 , shows top resource hoggers, refreshes every 2 seconds. top -n 1 -b > <filename> (pipes all enviroment variables to filename.
set | less , shows all enviroment variables associated with a process.
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
|
|