General :: Limit Unix Top Command Columns Via Arguments

Jun 2, 2010

I'm pretty sure this is super simple, but I've searched and searched and for the life of me I can't find any info on how to limit the columns that display in the interactive top program with arguments passed from the command line. I recall seeing something formatted like this ...

~/top -f (kdx)

Which would only show the %CPU, UID, program name fields/columns. I'd like to display the results in a really narrow terminal window on the right side of my desktop.

View 5 Replies


ADVERTISEMENT

General :: Running DF Command - Huge Space Between Columns

Jul 13, 2011

I am running the command on a Mac but due to it being a generic unix command and a command line query.. I thought I can write on this forum.. I am running the command

Code:
df -h | grep '/dev/'
I get
Code:
/dev/disk0s2 389Gi 62Gi 327Gi 16% /
/dev/disk0s3 76Gi 24Gi 52Gi 32% /Volumes/Backup
/dev/disk3s2 500Gi 47Gi 453Gi 10% /Volumes/Misc
Note the huge space between the 1st and 2nd Column..

This is because currently I have some NAS drives mounted which are not showing due to grep. When they are not mounted. The output is fine with equal spaces between each column (like between col 2 and 3.. or 3 and 4). I want to do a (dare I say) sed or awk or something to reduce the space between 1st and 2nd col. So that it has space like between col 3 and 4.. or 2 and 3. This is because I am showing this output somewhere and because of the space its not showing up correctly.Also I hope the command will still work when the NAS drives (afp) are not mounted.. basically consistency. The spaces are not showing properly in the quote tag. Changed it to CODE tag.

View 12 Replies View Related

General :: Passing An Array As Command Line Arguments?

Apr 2, 2011

how to pass an array as a command line argument in a shell script?

View 5 Replies View Related

General :: Reusing Find Command Results In Mplayer Arguments?

Jan 22, 2010

I wanted to supply mplayer with the output of find command as arguments. The error returned showed spliced names of files whenever spaces occurred. I have subdirectories in my /home/my_user_name/Music/ directory, and in them multiple *.oga music files. The actual command that I issued was

Code:
mplayer $(find /home/my_user_name/Music/ -name "*.oga")

mplayer started but then was looking for broken file names. I am thinking quoting has to do with it to preserve the filename as one string but different attempts were met with inroads:

Code:
mplayer `find /home/my_user_name/Music/ -name "*.oga"`
gave me the same result and
Code:
mplayer `"find /home/my_user_name/Music/ -name *.oga"`

complained about wrong mplayer syntax.

View 1 Replies View Related

General :: Bash : Pass Command Line Arguments Containing Special Characters?

Jul 14, 2010

I've written myself a linux program "program" that does something with a regular expression. I want to call the program in the bash shell and pass that regular expression as a command line argument to the program(there are also other command line arguments). A typical regular expression looks like "[abc]_[x|y]".Unfortunately the characters [, ], and | are special characters in bash. Thus, calling "program [abc]_[x|y] anotheragument" doesn't work. Is there a way to pass the expression by using some sort of escape characters or quotation marks etc.?

(Calling program "[abc]_[x|y] anotheragument" isn't working either, because it interprets the two arguments as one.)

View 7 Replies View Related

General :: Bash: How To Pass Command Line Arguments Containing Special Characters

Jun 24, 2011

I've written myself a linux program "program" that does something with a regular expression. I want to call the program in the bash shell and pass that regular expression as a command line argument to the program (there are also other command line arguments). A typical regular expression looks like "[abc]_[x|y]". Unfortunately the characters [, ], and | are special characters in bash. Thus, calling "program [abc]_[x|y] anotheragument" doesn't work. Is there a way to pass the expression by using some sort of escape characters or quotation marks etc.? (Calling program "[abc]_[x|y] anotheragument" isn't working either, because it interprets the two arguments as one.)

View 8 Replies View Related

General :: Running Shell Script Taking Command Line Arguments In A Jsp Page?

Feb 10, 2011

how to run a shell script taking command line arguments in a jsp page.

View 1 Replies View Related

General :: Write Shell Script That Takes A File Path As Command-line Arguments?

Dec 14, 2010

How can i write a shell script that takes a file path as command-line arguments.and it should report whether the path denotes a file or a directory.

View 2 Replies View Related

General :: Identify File Types - Command Line Arguments - And Count - How Many Of Them Are Regular Files

Feb 20, 2010

Write a script that will take a list of filenames as arguments and output a count of how many of them are regular files, and how many of them are scripts (if the file is executable, it will be assumed to be a script file)

Counts always come back as 0

View 5 Replies View Related

General :: Where To Download Unix Command

Jun 18, 2010

I tried to run % mvdir earlier and it said command not found. I then ran a search for it and still not found.Is there a place I can download the script for the command, and is there any information I should know post-download to get it to work?

View 4 Replies View Related

General :: What DMESG Command In Unix Do

Dec 10, 2010

What exactly is the use of dmesg?

View 3 Replies View Related

General :: Any List Which Indicates Unix Command Equivalents Also?

Aug 4, 2010

I am very new to Linux and Unix. Is there a command list which indicates the UNIX command equivalents also?

View 5 Replies View Related

General :: Check The User Command History In Unix?

Aug 19, 2010

I know the 'history' command give me a list of the commands I have typed into the Unix terminal.

How do I see the command history for all of the users currently logged onto the system?

View 1 Replies View Related

General :: Unix - Cat Command To Save Results Of Other Commands

Nov 26, 2010

This question may be silly and super easy for linux connaisseurs, but I was just wondering, for instance, I want to use the >find command to search for a file and send the results to a text file

View 5 Replies View Related

General :: Unix Command To Send File To Printer?

Mar 28, 2010

Is it true that the UNIX commands to send a file to a printer for printing are system-dependent?

View 2 Replies View Related

General :: Wrapper For Unix Command With Multiple Parameters

Jan 7, 2011

I hope to add a wrapper script for the command with different parameters. For example, for any Unix command or script, like below:
command.sh -s p1 -o p2 -q p3
or
command.sh

Probably we could do as this way
cat wrapper
$1 $2 $3 $4 $5 $6 $7 | tee test.log
(assume it has 0 to 6 parameters)

and use it like
wrapper command.sh -s p1 -o p2 -q p3
wrapper command.sh

It is a little ugly to list all fixed parameter as above, do we have better code to handle various parameters?

View 4 Replies View Related

General :: How To Visit URL Using Shell Script Or Unix Command

Aug 2, 2011

I want to visit a url but this shall be invoked by a shell script. Anyone let me know the command to hit a url in unix.

View 5 Replies View Related

General :: Unix - 'man' Command: Search For A Word/phrase And Cycle Through?

Jun 29, 2011

When looking for a certain word or phrase in the man page of linux command, one can type '/' followed by the word/phrase to search for it. What I'd like to be able to do is to search for the next occurrence of the word/phrase without having to type it out again. Kinda like when you use 'ctrl+f' in a browser to search for a word, and then press 'enter' to find the next occurrence of that word.If this is possible to do, how do I do it?

View 2 Replies View Related

General :: Command Line - SSH To Server Without Including Username In URL On Unix/Mac

Sep 8, 2011

I am trying to ssh into my server from the command-line without including the username in the url. I do not want it to send any username, as it currently takes the active account and sends that as user.ex:

ssh server.com -> (doesn't send default username)

instead of [URL] I would want to input username directly into the server, just like it is done using putty on windows. he wants to be prompted for a username, rather than having to provide one when connecting - but I don't really see the utility in such a thing. - birryree Sep 8 at 17:41

View 3 Replies View Related

General :: Unix Command That Allows To Know Which Process Is Running On Processor Core?

Mar 16, 2011

Unix command that allows to know which process is running on processor core?

View 2 Replies View Related

General :: Command Line - Unix - Program That Can Handle All Popular Compression/archiving Formats - E.g.tar, Gzip, Bzip2, Zip?

Jun 22, 2011

I sometimes get confused by the varying command line options I need to run common Unix archiving and compression software (e.g. gzip, bzip2, zip, tar).

Is there a program out there that can just Do What I Mean for common cases? For example:

View 2 Replies View Related

Programming :: Set For A Group Of Command Line Arguments?

Oct 11, 2010

i was wondering if someone could help me figure out a script for global variables i'm trying to set for a group of command line arguments:

basically i'm trying to set: if $# = 3 then i want to search for each all string $1 $2 $3

if $# = 4

then i want to search for each all string $1 $2 $3 $4

View 2 Replies View Related

Programming :: Parsing Command Line Arguments In PHP?

Feb 1, 2010

I want to know how to get eg. the contents of a form on a webpage which has been passed to a server side PHP script, inside for example an array which I can read. I've been reading a ebook on PHP which as far as I can see doesn't cover this inside it.

View 1 Replies View Related

Programming :: Passing Arguments To System Command?

Dec 17, 2009

I am calling another executable in my application (C programing) using "system" command
which is user interactive program. now i want to pass those args in system command only.

system(" executable ");

Executable will expect 1,2 or 3.

1 is to continue
2 for do changes in settings
3 exit from application

how to pass these in to system command

View 1 Replies View Related

CentOS 5 :: Parport_pc Command Line Arguments Ignored During Bootup?

May 9, 2011

I am having trouble trying to get the kernel to accept some command line arguments for parport_pc during bootup. I have a custom base board with a PC-104 CPU board connected to it through the ISA bus. On the base board I have 3 parallel ports mapped to addresses, 0x150, 0x158, and 0x160. Only the first one needs interrupts, the second two do not. So, on bootup I load the parport_pc module like this modprobe parport_pc io=0x150,0x158,0x160 irq=3,none,none I have been running an older RedHat kernel, 2.6.11 for the past few years and this has been working flawlessly. I had the above modprobe call in /etc/rc.d/rc.local.

Now I am trying to set the system up to use CentOS 5.5, kernel 2.6.18-194.el5. What happens is, the module inserts OK, but the system never recognizes the ports. (i.e, they do not show up in /proc/ioports)
But, if I log into the system, then rmmod parport_pc, then re-modprobe it as above, it works just fine and now my ports are visible. This is an embedded system, expected to just come up and run, so kicking it into action by hand is not an option.

I have tried putting a parport_pc.modules file in /etc/sysconfig/modules so that it will be seen by rc.sysinit, (some site I found while googling said modprobes need to be done earlier than in rc.local),and again, the module gets inserted but the ports are not seen. I have also tried putting rediculously long pauses between each step of the modprobing of the parport stuff;

[Code]...

View 7 Replies View Related

Programming :: Passing Command-line Arguments To Qglviewer Application?

Jul 13, 2009

how to use QGLviewer. I want to give my program a file name as a command line argument. All of the sample programs I find have a main.cpp file like this:

Quote:

#include <QApplication>
#include "window.h"
int main(int argc, char *argv[])

[code]....

Then the Window class, which is derived from QGLViewer, does all the program's actual work. If I want access to argc and argv, for example, to open and read a file that's passed as an argument, what would handle that? Is there a built-in way to get the arg variables to the window class, or do I need to just write a loadfile function and pass them?

View 1 Replies View Related

CentOS 5 Server :: Mysqld Won't Accept Command Line Arguments?

Mar 28, 2009

I have recently installed MySQL Server on my CentOS box.

CentOS 5 MySQL 5.0.45 (installed using 'yum install mysql-server') I can start the daemon without error by issueing the following command: service mysqld start

The problem is that I want to use a number of the command line options available to mysqld, such as --verbose and When I issue '/etc/init.d/mysqld --verbose --help' I get the following output:

[Code]...

View 1 Replies View Related

OpenSUSE Multimedia :: Using Flash Stream Dumpers - Command Line Arguments

Aug 5, 2010

Has anyone used rtmpdump or flvstreamer? They compile well (there is also a package on Packman for rtmpdump, but not for the latest version) and have man pages listing a bunch of command line arguments, but I have not yet figured out how to use them in connection with browser and flash plugin.

View 1 Replies View Related

Ubuntu :: Unable To Find Any List Of Arguments That Can Be Added In The Command Line

Aug 23, 2010

I am able to start up firefox just fine out of my terminal, but i have not been able to find any list of arguments that can be added in the command line. what i'm looking for is that it starts up in Full Screen mode right off. is there an argument that can be added to ti to do that?

View 2 Replies View Related

Software :: Create A Command Line Inside A Bash Script That Contains Arguments?

Dec 9, 2010

I'm having problems with bash quoting. Maybe someone can tell me what's going on.. Basically, I need to create a command line inside a bash script that contains arguments that contain spaces and bash variables that need to be expanded.

[Code]...

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved