General :: Shell Script - Cooked Or Raw Mode?
Oct 27, 2010I want to know shell (same as bash) work as Cooked mode or Raw mode? and How work?
View 5 RepliesI want to know shell (same as bash) work as Cooked mode or Raw mode? and How work?
View 5 RepliesI want to use ssh to execute a command and to wait endlessly to log everything (in file) that comes as a stream of the connected server. But unfortunately, in the manual its written "If command is specified, it is executed on the remote host instead of a login shell"
So what happens is that when I specify my command:
ssh user@server "my_command"
It executed the command and the flow of execution returns to bash shell. So basically my session ends right after the command is executed. This happens only in case I specify command in the command line. If I login into ssh manually and then type "my_command", then the session doesn't end. I want the ssh not to exit, because after "my_command" executes, I want to capture everything in the session.
I'm pretty sure I cooked a video card (fanless deal, prone to running hot). Anyways the computer boots fine and everything seems to be working from an ssh perspective. Is there some way I can ask the machine if the video card is broken?
View 1 Replies View RelatedBelow is a print out of my partition Table from Fdisk, in Cylinder mode, Sector mode, and then in expert mode?
Why in expert mode does it look like Partitions 2 and 3 share the same sector / hd / Cylinders? Is this OK?
Code:
I want to show line numbers automatically in bash scripts (a habit of being a programmer) and when I load an emacs lisp file it works from the command below but the following command that sets up the same thing for bash scripts doesn't work. I played around with this for quite some time and couldn't find anything that would make work.This is the first time I have tried to customize emacs so it could easily be something ignorant on my part.
;; Load additional packages
(load-file "~/.elisp/whitespace.el")
(load-file "~/.elisp/setnu+.el")
[code]....
My linux workstation recently crashed. After rebooting, Linux (Red Hat 5.3) will not boot properly and automatically went into emergency mode or recovery mode i think. I can still see my /home/user/ and all the files inside.I boot from CD to rescue mode and tried mounting read-only the /dev/sd5 which contains the files in the crashed hard disk to try to copy out my files but mounting was unsuccessful (invalid argument). I checked the filesystem type using fsck -N /dev/sda5 and shows it to ext2. i tried to mount another known working hdd and was successful.
My question is why in emergency mode, the crashed hdd is able to be mounted automatically as read-only but cannot be done in rescue mode thru a bootable CD?Is there any special mount options used in emergency mode?I also cannot copy out in emergency mode booting from the crashed hard disk as everything is read only.
MACHINE: HP Proliant DL260G5OS: SLES 11 SP1kernel: Linux xserver 2.6.32.12-0.7-default #1 SMP 2010-05-20 11:14:20 +0200 x86_64 x86_64 x86_64 GNU/LinuxIt is used as remote xserver in a LAN.I have configured /usr/lib/restricted/bin/.rbashrc with some environment variables but when the users logon in the system finally is executed $HOME/.bashrc and some environment vars are overwritten.
View 2 Replies View RelatedI would like know when it is necessary or advisable to write a shell script instead of shell function ?
View 3 Replies View RelatedI am wondering if I can open a shell or new terminal thing from within the terminal in a unix/linux enviroment. Particularly a commandline only one where there is no GUI. Is this doable? how do I do it?
View 3 Replies View Relatedhow do I make grub boot to allow me to choose, like safe mode and normal mode and all that second, how do I do automated back ups (preferably using file copy) for something like every sunday at 11:00 am using the command line, i use to know but forgot.
View 1 Replies View RelatedI attempted to install Catalyst 10.11 for my ATI HD 2600XT and the system now only displays lines and a large block of pixels where the mouse would go. CTRL-ALT-F1 kills the system and does not provide a command prompt. This is a single installation, not dual-boot, but there is no Press Esc to access the Grub menu during startup so I cannot choose safe mode. I attempted to get into Recovery mode using the flash drive that I used to install the system and it tells me there is no Recovery kernel (I used the 64-bit Desktop installer, not alternative). Does anyone know an alternative to get into the Grub menu other than ESC during bootup? Alternatively, do I need to download the 64-bit Alternative ISO and create a new boot disk with it so I can access Recovery mode? Is there something else I'm not thinking of?
View 5 Replies View RelatedI ordered this USB 802.11n dongle for about $10 and am having problems.I found a firmware related bug (Bug #595455) that keeps it from working out of the box and got around that. I put the right firmware file in the right place and CAN CONNECT TO B or G Access Points.hen I put my AP in N-Only mode, I can see the network, but cannot associate. With the AP in mixed mode I can Associate using G.The most interesting thing I found was something that had very
few google hits (like 4). In the dmesg output after associating I see the message:
Successfully associated, ht not enabled(0, 1)The most interesting thing about this is the (0, 1) at the end.I don't know what that means but it seems like a clue as to what the problem is.This device uses the realtek chipset 8191S, there are conflicting reports on this, but all the reported possibilities seem to use the same driver from realtek (rtl8712_8188_8191_8192SU_usb_linux_v2.6.0006.2010 0625).Here is some random info:
Dmesg output:
[85082.620027] usb 1-3: new high speed USB device using ehci_hcd and address 6
[85082.754586] usb 1-3: configuration #1 chosen from 1 choice
[85082.755456] ==>ep_num:4, in_ep_num:1, out_ep_num:3[code]........
I played with the graphics in kde4 and seem to have losy my installation. i have tried the rescue system option, recover system options and in desperation (i was just about to reinstall) tried booting in failsafe mode, and it worked!
where do i go to find out what the problem is regarding the normal boot mode? i think my pc is starting to resent the continual use of the reset button!
I installed ubuntu 9.10/9.04 on my usb key as live image couple of time. I have trouble when I try to install wine on my usb key. I am wondering what is the difference if I install my ubuntu into my usb key directly? will that be slower compared with live CD mode? I guess live CD mode may use memory as part of harddisk to save temepory files and normal usb linux installation won't do this for me. Is this true?
If so, do I have a choice to point my tmp directory to system memory area?
When I first installed ubuntu 10.10, the display was for some reason tinted green and shifted a few inches to the right. After experimenting with the resolution preferences, I eventually got it to a large resolution (1280x720 ... or something like that) yet is was quite blurry. I found out that the problem was with my monitor after I switched it to TV mode, then back to PC mode. It became perfectly clear! All I had to do then was adjust the screen positioning by shifting it left a bit.
Even though I have made the resolution I figured out to be default, whenever I turn the PC on after shutting down, it goes back to the "green-and-to-the-side" mode. :/ Ain't really a big problem, until I tried to fiddle with the resolution preferences s'more.
Somehow, I have set it to be twice as wide of the maximum my monitor can display, went back to being green tinted for some reason, and is completely shifted left (yet the right side is still visible) This means that I cannot see what is going on the left side, and cannot adjust the resolution preferences, nor can I click blindly cuz the border is only around my visible side of the screen. Now it is stuck like this.
I've researched many hours and eventually found the terminal command for the resolution preferences. it popped up on the visible side. Although it was to no avail cuz I HAVE TRIED EVERY SETTING AND OPTION and absolutely nothing changed. I assume a system restore would simply revert it back to the previous satisfactory settings, but the thing is I want to FIX it. I am new to this terminal stuff, so I want to learn it and all that. To put it simply, here's what I want:
Learn how to manually adjust resolution without depending on a simple dialog box. Make the satisfactory resolution default and consistent through turning it on and off. Link that could teach me the essential commands, all this googling is stressful. D:
The system always boot up in Graphic Mode. After installation of Web Server, I want to disable Graphic Mode and change it to boot to Text Mode to save memory. Is there a way to disable graphic mode?
View 1 Replies View RelatedI was reading about ext3 feature and I have read about its journaling modes. I would like to ask what is the default journaling mode of ext3 fs in slackware(or is it in all distro using ext3)? I'll install slackware when my new pc arrive and the fs I will use will be ext3 and I like it to have data=journal mode for its journaling. I have read in some wiki how to set the journaling mode into data=journal mode.
Code: # tune2fs -O has_journal -o journal_data /dev/sdXY Do i need to issue this command or is this the default mode in ext3 in slackware?
I am an emacs user, and I noticed that on my new machine (running F15, 64bit) flyspell-mode will not work in tex mode.
I get errors that look something like this:
Code:
Spell-checking inequality-model.tex using hunspell with default dictionary...
Spell-checking region using hunspell with default dictionary...done
ispell-send-string: Process ispell not running
When done with a buffer, type C-x #
code....
I accidentally chose the "recovery mode" and now i dont know what to do. What commands i have to enter to go back to normal ubuntu mode with graphic etc?
View 9 Replies View RelatedI need boot in emergency mode (not single user mode), from docs:
[URL]
in red hat enterprise 5 it's ok, not in red hat 6.
I want to change my default shell to tcsh. I used
Code:
usermod -s /bin/tcsh username
command as given at url
But if I open a new shell, it is still a bash shell.
How do I make my default shell as tcsh?
I am using ubuntu10.04-server 64bit AMD with fluxbox. After I ran Matlab in a shell (without GUI) the shell does not display characters anymore, but will execute any command, I just can't see the characters that I'm typing.. I use aterm and xterm, does anybody know why that is, am I missing a package?
View 1 Replies View RelatedIs there any way I can switch my desktop shell from unity to, say, gnome-shell? I can switch using other console shell I like (bash, csh, fish, etc.). Assume that there is a stable alternative desktop shell, I should be able to choose, too.
(For console shell, we goes to /etc/passwd. But for desktop, I can't find the way to config.)
Is there a way to export a variable to parent shell in shell scripting ?
View 3 Replies View RelatedI am trying to create a shell script similar to ls, but which only lists directories. I have the first half working (no argument version), but trying to make it accept an argument, I am failing. My logic is sound I think, but I'm missing something on the syntax.
Code:
if [ $# -eq 0 ] ; then
d=`pwd`
for i in * ; do
if test -d $d/$i ; then
echo "$i:"
code....
Is there some type of functional way to read things in the Python shell interpreter similar to less or more in the bash (and other) command line shells?
Example:
Code:
>>> import subprocess
>>> help(subprocess)
...
[pages of stuff to read]
...
I'm hoping so as I hate scrolling and love how less works with simple keystrokes for page-up/page-down/searching etc.
I am getting a pop up window saying: "Not optimum mode. Recommended mode 1280 x 1024 60Hz" In my case, this is happening after installing Debian 504 AMD64, the Samsung "SyncMaster 940N" that gives this message or warning was working fine for a few years on another machine under the previous Lenny distro.
The only way to get rid of this unwanted pop-up window (the monitor is working fine) is to press the "AUTO" switch on the monitor, there is no such option in the menu of the monitor to disable anything or change the resolution and it seems to me that, unlike what was suggested as an answer in similar threads, the problem is not with the monitor but with the distro unable to detect the monitor properly. The only mention in the "xorg.conf" file is as follows and running "dpkg reconfigure ..." has no other effect than creating a new exact duplicate of the file.
Section "Screen"
Identifier"Default Screen"
Monitor"Configured Monitor"
EndSection
Going by a tutorial found here ( see below quote ). Quote: Owner match The owner match extension is used to match packets based on the identity of the process that created them. The owner can be specified as the process ID either of the user who issued the command in question, that of the group, the process, the session, or that of the command itself. This extension was originally written as an example of what iptables could be used for. The owner match only works within the OUTPUT chain, for obvious reasons: It is pretty much impossible to find out any information about the identity of the instance that sent a packet from the other end, or where there is an intermediate hop to the real destination. Even within the OUTPUT chain it is not very reliable, since certain packets may not have an owner. Notorious packets of that sort are (among other things) the different ICMP responses. ICMP responses will never match.
Table 10-24. Owner match options
Match--cmd-owner
Kernel2.3, 2.4, 2.5 and 2.6
Exampleiptables -A OUTPUT -m owner --cmd-owner httpd
Explanation
This is the command owner match, and is used to match based on the command name of the process that is sending the packet. In the example, httpd is matched. This match may also be inverted by using an exclamation sign, for example -m owner ! --cmd-owner ssh.
I tried to add a rule for my torrent client with Code: iptables -A OUTPUT -m owner --cmd-owner transmission -j ACCEPT However, iptables kicks it back with Code: iptables v1.4.4: unknown option `--cmd-owner' Try `iptables -h' or 'iptables --help' for more information. The mode isnt even referenced in the iptables man on my system. Am I missing something?
In a DOS prompt, I would like to ftp ASCII get a file from a Linux machine. The file was created in vi, just a normal text file.in DOS prompt:
Code:
ftp> ascii
200> Switching to ASCII mode.
[code]...
I've been using Vim for several months now via my web host (they allow putty access). All of a sudden, the escape key has become unresponsive. I cannot exist insert or any other mode by simply hitting escape. I have to hit F1 which brings up the help in vim and kicks me into command mode.
I'm most certain that my escape key on my keyboard is functioning fine since all of my windows shortcuts that use the escape key operate normally.
I know this is a ridiculous question and I'm certain there's a lot more to look into regarding a solution. What I really need is a solid lead as to where to start looking.
I'm using vim via putty I'm logging in using jailshell I'm not root