General :: Why Grub>root Command Gives (fd0) Output

Jun 24, 2011

I am learning Linux administration and I am new in this area. Currently I am trying to find out which drive has grub.conf file. Following commands giving me correct output (hd0,0):

find /grub/stage1
find (hd0,0)/grub/grub.conf

But root command gives me output (fd0). Why?

View 3 Replies


ADVERTISEMENT

General :: Append Command Output To File By Giving Command In Terminal?

Jul 3, 2009

I am using openSUSE 10.3.When I install software from tarball then to record time required I send output of date to beg.txt(when installation begins) and end.txt (when installation finishes).How can I append output of date to a file so I don't need two files?

View 4 Replies View Related

General :: Edit Grub Menu From Initial Grub Screen - Possible To It's Own 'e' Option Or 'c' From Grub Command Line?

Nov 20, 2010

my Setup is Fedora 14 x64 + radeon hd 4830 i've downloaded .run package from ati site with latest driver for x64 systems. installed it, but didn't edited grub.conf becouse i didn't understood anything there (probably didn't spent enough time to get things understand) Now i've lost possibility to enter my Fedora system. during boot it lost it's modern blue boot screen (with filling drop), it was replaced by standard old boot screen with triple-color stripe. after this boot screen monitor start blinking going on and off. and on last step i'm getting "Fedora 14 boot bla bla bla something" on screen. nothing works except Ctrl+Alt+Delete. system reboots showing successful daemons shutting sequence. How can i edit grub menu from initial grub screen is it possible to it's own 'e' option or 'c' from grub command line?

View 4 Replies View Related

CentOS 5 :: Specify Root Option For Kernel Command Of Grub Conf

Feb 12, 2010

I'm using 2 cloned disks with CentOs5.3 and I need to be able to control which one is booted. I can specify which disk in the BIOS but after stage 2 it is always running from disk 2. When I have puppy linux on one disk and CentOs on the other I can boot off of either as selected by the system BIOS so the BIOS is not the issue. I think it is how the root option is passed in the kernel command in the grub.conf.

kernel /vmlinuz-2.6.18-128.el5 ro root=/dev/VolGroup00/LogVol00

I think when the OS searches for the /dev/VolGroup00/LogVol00 share is locates 2 since the disks are clones and uses the last one found. On information I have found for the kernel command and the root option it appears CentOs uses it differently. CentOs uses a volume name as specified /dev/VolGroup00/LogVol00 instead of a partition designator /dev/hda2. Is there a different way to specify /dev/VolGroup00/LogVol00 in CentOS for the root option for the kernel command of grub.conf?

View 7 Replies View Related

General :: Redirecting Command Output To Input Of Another Command?

Jul 2, 2011

I want to run gsettings list-schemas (which return a list of about 100 names separated by spaces)and somehow direct each name one at a time as the input to this command:gsettings list-recursivelyI've tried it with awk, and standard | piping and also as a string variable strvar=$(gsettings list-schemas) and using the $strvar as the input butam missing something in between I'm sure like for - while or proper syntax of awk etc

View 3 Replies View Related

General :: Use Output Of Previous Command As Parameter To Another Command?

Nov 13, 2010

I want to use the output of a previous command as a parameter to another command. For example: to know where "nice" is stored i typed: which nice output: /usr/bin/nice now the second command i typed is: ls -l /usr/bin/nice Is there a way to have a single command like: ls -l which nice ?

View 4 Replies View Related

General :: Df Output To Root's Mail Box

Mar 29, 2011

I'm trying to make a script in my /etc/cron.d directory called df. Anyways, I want to be able to have it run the df command every hour, 23 minutes past the hour. I have the first part, I just need assistance in directing it to roots mail box.

View 2 Replies View Related

General :: Getting Output From GRUB During Boot From USB Key?

Oct 5, 2010

I have a home-brewed Linux system that I've installed on a USB key. I'm plugging this into a laptop. I can tell from what is going on that it has successfully loaded the kernel and is running the shell script that is specified on the "kernel"he GRUB configuration.But... although I can get output from printk() calls in the kernel just fine, I get nothing from "echo" commands (or any other commands) in the initialization shell script. I can see that the commands are being run,t the output is just disappearing into the void.This is problematic because there are other problems, but I can't get debug output to track those down...Given that printk() output goes to the laptop screen as expected, it seems that GRUB must be sending other output to something other than the console, yet the grub.conf configuration is quite simple:

default=0
timeout=0
title Test

[code]...

View 4 Replies View Related

General :: Redirect Output From Dd Command?

Apr 7, 2010

How to redirect output from dd command to /dev/null ?

View 2 Replies View Related

General :: Copy Command Output In Vim?

Jul 25, 2010

For example, if I type ':pwd' to get the current working directory, I can select the text in gvim but I can't figure out how to copy it to the clipboard. If I try the same in console vim, I can't even select it with the mouse. I would like this to work with all vim commands, such as set guifont to copy the guifont=Consolas:h10:cANSI output.

View 4 Replies View Related

General :: Format The Output Of The Ps Command?

Aug 27, 2010

i am running ps xo "pid,command" but I can't find my process in the results. I know that the process is running because I run ps ax | grep command-name

View 4 Replies View Related

General :: Bash Command Output?

Feb 12, 2011

What does the following Shell program do ??: () { :| : &} ; :Warning: My computer got hung when i tried to execute this.Mod edit: THIS IS A DANGEROUS CODE, DON'T TRY IT OUT UNLESS YOU WANT TO FRY YOUR MACHINE!

View 2 Replies View Related

General :: Add The Hostname To Output Of Other Command?

Apr 28, 2010

i have a variable called hostname which contains hostname of my machine. How would i add the hostname to output of other command . For eg. if a output of command is . command : xm list

Quote:

abc 123 334
bcd 223 333
ddd 333 333

How would i add hostname column to it. My output should look like

Quote:

abc 123 334 hostname
bcd 223 333 hostname
ddd 333 333 hostname

View 1 Replies View Related

General :: Modify The Output Of Df Command?

Mar 20, 2010

this is the output of df command on my system

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda8 18073924 4911628 12244184 29% /
udev 642140 308 641832 1% /dev

[code]....

View 14 Replies View Related

General :: Output Format For LS -LTR Command

Feb 5, 2010

I have a script that is in Unix. I wanted to know is there any difference between output of ls command in unix and linux

In Unix
Code:
ls -ltr | awk '{print $9}'
In linux output is something similar to

Code:
drwxrwxrwx 2 vinay vinay 4096 2010-02-04 20:31 test
According to above output nothing will be displayed for

Code:
ls -ltr | awk '{print $9}'
ls -ltr | awk '{print $8}' will give test as ouptut in Linux.

I wanted to check the output format for ls -ltr, Anyone using Unix systems may paste a sample output of the command ls -ltr..

View 2 Replies View Related

General :: No Output From Top Command Run By Crontab?

May 17, 2011

I write a little script that run top command and clear the output leaving only cpu ram and swap values. If i run the script manually everityng works fine but when i schedule the cript to run every 5 minutes from /etc/crontab all run fine but the output of the top command doesnt appear in the log :

This is the cript :

#!/bin/sh
echo "#############################" >> /var/log/performance.log
echo "" >> /var/log/performance.log
/bin/date >> /var/log/performance.log

[code]...

View 6 Replies View Related

General :: Not Able To Understand The Output Of W Command

Aug 9, 2011

I have taken putty session of a server from two separate machines namely HOST1(3 sessions) and HOST2(1 Session) . However w command says there are 5 users

Code:
# w
09:29:36 up 34 days, 15:48, 5 users, load average: 0.62, 4.33, 8.16
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/17 HOST1 09:18 4:26 0.01s 0.01s -bash
root pts/18 HOST1 09:27 1:21 0.00s 0.00s -bash
root pts/21 HOST2 09:29 0.00s 0.00s 0.00s w
root pts/20 HOST1 09:29 1:39 0.00s 0.00s -bash

View 3 Replies View Related

General :: Output From 'mount' Command

Jul 6, 2010

How to find out of a filesystem is in readonly mode?

What will the output be from the 'mount' command if a filesystem is read-only?

View 2 Replies View Related

General :: Analyze The Output Of Sar Command?

Mar 17, 2011

I need a tool to analyse the output of sar command. just like sarg which analyses the log files for http , squid etc . I need a similar tool for sar output analysis.

View 3 Replies View Related

General :: Run A Command Per File From The Output Of "find" Command?

Sep 8, 2010

I want to scan a particular directory recursively and run a particular command with each file as input. For this I am using "find /dir/path". I dont want to write any long script containing loop on the output of "find". I want a single command which will allow me to run a command on each file of the "find" command output.

View 3 Replies View Related

General :: Exec Command With Grep Output?

Feb 15, 2011

I have a requirement to find the files having its name as ack_reply. However, there are many other files in the same directory as these resides. Now I have to remove these files from the folder and retain others after 7 days. So I tried to write the below script with grep command.

find $directory -type f -mtime +7 | grep ack_reply

how can I pass this output to -exec command.

If I am not using grep command my script would be as

find $directory -type f -mtime +7 -exec remove.sh {}\;;

How can I use -exec with grep and find.

View 4 Replies View Related

General :: How To Print Command Output To A File

Apr 29, 2010

I am creating a script to sync my important documents between two system. I want my script to generate a log file for the last action. can you suggest me a way to achieve this.Question: If I execute the rsync command with -v flag, it will print a lot of messages on the console. Is there any way. So, I can redirect these logs to a file?

View 4 Replies View Related

General :: Split Output Of A Command To Two Terminals?

Jun 27, 2011

How can I split an output of a command to two terminals? one will get stdout and the other will get stderr. The best I could do is:
On first terminal code...

This works ok but it prints the errors over and over again every time, is there any better way to redirect the errors to another terminal?

View 2 Replies View Related

General :: How To Truncate Command-Line Output

Sep 6, 2011

If I grep -nr sumthin * in my source code directory, it also spews out very long lines from minified JavaScript or CSS files. I want to get just the first 80 characters per line. For example, a regular grep gives me this:

css/style.css:21:behavior: url("css/iepngfix.htc")
css/style-min.css:4:.arrow1{cursor:pointer;position:absolute;left:5px;bottom:10px;z-index:13;}.arrow2{cursor:pointer;position:absolute;right:5px;bottom:10px;z-index:13;}.calendarModule{z-index:100;}.calendarFooterContainer{height:25px;text-align:center;width:100%!important;z-index:15;position:relative;font-size:15px!important;padding:-2px 0 3px 0;clear:both!important;border-left:1px solid #CCC;border-right:1px ... etc.

But I'd like to get just this instead:
css/style.css:21: behavior: url("css/iepngfix.htc")
css/style-min.css:4:.arrow1{cursor:pointer;position:absolute;left:5px;bottom:
What Linux command can do this?

View 3 Replies View Related

General :: Redirecting Command Output To File?

Sep 19, 2011

This seems so simple when doing it from command line but I'm not able to accomplish it inside a script. I am trying to put output of following command into a text file:

CMD= mysql -uroot -psecret -e 'SHOW SLAVE STATUS G;'
FIL=~/replication-`date +%F`.txt
MAILTEXT=~/mailtext.txt
touch $FIL
$CMD > $FIL

Where FIL is a variable that contains path of the file to which to output command. I am running this command in a shell script from where I want to email contents of $FIL as attachment using mutt. But I am always getting 0 byte file. Also if I examine in directory the file is of 0 byte length.

View 3 Replies View Related

General :: Evaluate Size Of Output Command?

Nov 18, 2010

I'm trying to do something like this:

Code:
#!/bin/bash
cmd1=$(cat /var/log/messages | grep -e 'blocked for more than 120 seconds' | cut -c 55-62)
if $cmd1 != 0; then echo 'okay'; fi

however i'm messing up somewhere... bash attempts to evaluate the elements in cmd1. when I try to run this script it complains saying:

Quote:

test1.sh: line 5: blocked: command not found

I am open to alternatives. My intent is to replace cat /var/log/messages with dmesg, so I can attempt to determine if a problematic application I use encounters a blocked state (unresponsive for more than 120 seconds).

Should I be using a different test condition? I tried something like:

Code:
# this declares cmd1 as an array
cmd1=($(cat /var/log/messages | grep -e 'blocked for more than 120 seconds' | cut -c 55-62))
#attempt to determine if number of elements in array is greater than zero
if ${#cmd1[@]} > 0; then echo okay; fi

But I get the same error... what am I doing wrong?

View 3 Replies View Related

General :: Provide Response To Command Output ?

May 4, 2011

I am writing a bash shell script on RHEL. I need a way to analyze the output from a command, and provide a response to that command depending on what is found.

On the command line this looks like:

In other words I want to script this - capture the output from the mlsmailbox --delete command, respond with a yes if the mailbox was found, and go on if it was not found. There may be other responses to the mlsmailbox --delete command that I need to analyze and respond to as well.

View 3 Replies View Related

General :: Redirecting Output From A Command Using Bash?

May 10, 2011

I would like to get the command and it's output redirected i have tried using the below but my syntax seems to be incorrect .

<<EOF
$(ls)
EOF

View 2 Replies View Related

General :: 'set' Command To Output Vars Without Values?

Sep 3, 2010

I need a list of shell variables without values and without finctions. Can't find an option for set or typeset to print values only

View 4 Replies View Related

General :: Any Way To Store Output Of Command Into Variable?

Mar 3, 2010

I tried using the tail command in my shell script and storing that value in a variable a but an error keeps coming. Is there any other way to store the output of a command into a variable. Cannot Read text from text file and store it in a variable using shell script. The thing is I need a number from the file new.txt and use that number in my script

#!/bin/bash
a = `tail -1 new.txt|head -n 1`
echo $a

View 2 Replies View Related







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