Ubuntu :: Write To A File From Terminal?
Aug 21, 2011
I have created a file newfile.txt using: touch newfile.txt Now I want to write to that file from terminal i.e whatever I will type after the $ will be written to the file this is what I want. How can I do that?
View 6 Replies
ADVERTISEMENT
Sep 30, 2010
How can we write a file and display in terminal at the same time. Like for example, when I do..
php -f file.php > testfile
That should save right.. but I want to display it in terminal otherwise.
View 4 Replies
View Related
Nov 17, 2009
Ive installed Gaussian '03 on fedora Core 10, but I'm unable to run it. It aborts and i get the following error
Code:
Erroneous write during file extend. write -1 instead of 4096
Probably out of disk space.
Write error in NtrExt1
View 3 Replies
View Related
Jan 2, 2010
If my password is for root and me is the same, how do I write my password as root and get permission to enter as root?
View 4 Replies
View Related
Mar 23, 2010
I am writing a code in bash script, in my ubuntu command terminal. The program should send the message, "Hello John!!" 5 times to john's terminal (assuming he is logged on to the server). But I keep getting this error: Syntax error: end of file unexpected (expecting "done").
#!/usr/bin/sh
clear
x=1 # this sets up the flag so we can have it send a limited amount
while [ $x -le 5 ]
do
write jdouglas << EFO
>Hello John!!
>EFO
x=$(( $x + 1 ))
done
View 1 Replies
View Related
Jun 25, 2010
I want to update my gnome to the latest version (2.30) because I have 2.28 so I go to terminal and enter the command "apt-get" or try "zypper dup" which both ask for root so I just add "sudo" before the commands and when it ask for the password it doesnt let me write it.
View 9 Replies
View Related
May 24, 2010
I am trying to write a bash script to call from a terminal that will change the terminal title. I am using ubuntu 10.04. The script is meant to be used in the gnome-terminal.
Here is what I have:
Code: #! bin/bash
echo "New title: c"
read title
echo "33]0;$titl07c" -e
[Code]....
it doesn't work
I think the problem has to do with modifying PS1 inside the bash so i tried this:
Code: echo `export PS1="[e]1;u@h:wa]${debian_chroot:+($debian_chroot)}u@h:w$ "` and it still didn't work.
View 1 Replies
View Related
Mar 9, 2010
is it possible to write a script, when prompted in the terminal to output a tree listing of files and folder with out using a tree command.for example. control the output of ls -l to output that list like a tree (-- or /-)
View 3 Replies
View Related
Mar 22, 2010
I'm trying to write a bash script program in the Linux command terminal that will write to a fellow user and then continue reading down the program. this is what i have (kind of explains the idea too):
#!/bin/sh
clear
echo "this is before the write command"
write jcummins
this message should go to jerry
echo "the message didn't send and this string will not appear"
echo "it appears it has stopped at the write command"
View 5 Replies
View Related
Jul 30, 2010
When I ls -l /etc/passwd, -rw-r--r-- 1 root root /etc/passwd When I login as myself, and rm /etc/passwd, it asks: rm: remove write-protected file '/etc/passwd'? If I say yes, will it actually delete the passwd file?
View 1 Replies
View Related
Feb 4, 2010
What are the possible problem when Windows access the file from Ubuntu got Read Only even though have a full permission to read, write and execute the file? Ubuntu to Ubuntu accessing the file there is no problem only Windows got a problem.
View 1 Replies
View Related
Apr 1, 2010
i have created a network at home, and i have connected 3 pc to a stwitch and the switch is connect to a computer which has xp in it. new i can use internet easily but when i am using internet in ubuntu it is ok, and also download any thing is also very good, but when i write "sudo apt-get" in terminal or use "synaptic package manager" they download software where slow not more than 14kb or sometimes in bytesi dont know what is the problem
View 5 Replies
View Related
Jul 26, 2011
there is any way (via terminal or gediting a file) to use .flac files instead of .ogg in a sound theme file? I am creating a sound theme (several truthfully) and I would like to use the FLAC format if possible.
View 5 Replies
View Related
Jan 26, 2011
I have tried for some time to write an .img file to a USB and a SD Card to boot from to my Netbook. The .img file is from Moblin and they suggest that I use Win32 Disk Imager to write the file to my USB. Though it haven't worked for me even if i use the SD Card and other computers.
The easiest for me would be if i could write the .img file on my SD Card and i have search for some tutorials but haven't found a way to write the file.
I've read something about "dd" but don't get the "command", "code" - thingy. If any one know an easy tutorial for it would be great! Or even better would be a tip to another program/utility like the Win32 Disk Imager that works.
I Use a Windows 7. HP Pavilion Elite and a Windows XP. Compaq Mini 110
View 1 Replies
View Related
Mar 10, 2010
I want to backup my Ubuntu box and I found a couple very helpful articles that describe how to use tar for backup and restore. So far so good. I've dabbled in Lin/Unix in the past, mainly on work systems, but Linux on my personal PC is new to me.
When I ran the tar command as root (su -) I noticed several errors scrolling by in the window. It's scrolling too fast to note the exact errors, but I did notice "permission denied" a few times.
Is there some way that I can capture the output of the tar command to a file so I can review it for errors and/or permission denied statements?
Can I just add some arguments to tar?
tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys /
View 2 Replies
View Related
Dec 9, 2008
How can I read .gz file direct on shell/terminal without decompressing the file?
satimis
View 5 Replies
View Related
Apr 20, 2010
I have a script where I want to redirect stdout to the terminal and also to a log file aswell as redirecting stderr to the same log file but not the terminal.I have the following code which I found on the net which redirects both stderr and stdout to a file and the logfile,
Code: if [ -p $PIPE1 ]
then
rm $PIPE1
[code]...
View 3 Replies
View Related
Aug 27, 2010
how can I install 10.04 over 7.04 (which is partitioned with XP) which I want to retain WITHOUT over writing XP and WITHOUT losing my data files stored in 7.04?
View 2 Replies
View Related
Sep 7, 2010
I have a file system that I can't seem to read and write to. I've tried everything I can think of.
Code:
root@xubuntu:/mnt/t1# ls -la
ls: cannot access .Trash-1000: Input/output error
[code]....
View 2 Replies
View Related
Nov 12, 2010
I am trying to change the write permissions on a file and On the screenshot you will see where i have underlined, its states i dont have owner rights to modify this file, how do I get owner Permissions when this is my installation..
View 9 Replies
View Related
Jan 18, 2011
How do i write ping output to txt file?
View 3 Replies
View Related
Jul 24, 2009
I have a PHP script that's attempting to open a file for writing, but I am getting an error message:
Is this a php.ini setting, or some redhat setting?
View 1 Replies
View Related
May 24, 2011
I'm writing a script/plugin for Nagios for testing a WebLogic server.. I redirect some output to a file, and then i read that file to get some data, but i can't seem to write to that file with my script :s... this is the most important code
[Code]...
* EDIT * When i execute this script through a local terminal (PuTTy), it works but when i execute it from Nagios, it doesn't work..
View 5 Replies
View Related
May 29, 2010
I'm trying to write a script to generate an html file (complete with formatting- echo "[random formatting]" >> index.html) for all the files in the given directory. So far, it works pretty well. HOWEVER, I want the listed files to be treated as links. I'm using awk to grab the part of the filename I want, but I don't know how to do this out as it fails if there is more than one file. The HTML side would look something like this:
Code:
<li><a href="2010.05.29.html">May 29</a></li>
It all works fine up to the actual number of the day- fine with one file, fails with more than one. My code is this:
Code:
# Grabs all the files and puts them in a list with anchor text "Listed"
ls | find 2*.html | sed -e 's/^/<li><a href="/'
[Code]...
View 2 Replies
View Related
Jan 5, 2011
Preferably synchronized lyrics, and would also be best if it automatically was able to fetch them from some website.
View 4 Replies
View Related
Feb 9, 2009
After the syslog facility rolls logs weekly, the Postfix cannot seem to write properly to the mail.log file. What I don't quite understand is that Postfix is still able to write the following error to the log file: ..."status=deferred (temporary failure. Command output: Can't open log file /var/log/mail.log: Permission denied )"It is my understanding that Postfix uses several different processes to write to log files, but I'm confused as to why it is able to write errors to the log but not able to write when sending/receiving mail. After I chmod 777 the mail.log file, Postfix slowly clears the queue and the mails are then received. Everything functions fine for another week, until the logs roll again.
View 6 Replies
View Related
Aug 16, 2011
I want to keep a trace of the URL I visit, so I use a command line like this:
tcpdump -ien1 -v -X 'tcp port 80' | sed -nl
's/^.0x[0-9a-f]{4}:.{43}(.)$/1/p' |perl break.pl |perl -pe
's/(GET|POST).(.*?).HTTP/1....Host:.([a-zA-Z._0-9-]*)../"
BEGURL
[Code]....
I also tried redirecting stdout and stderr to /tmp/out, it's still empty. The file has write access. I have no idea what it can be. Is there anything else than stdout and stderr?
View 2 Replies
View Related
Apr 16, 2010
I want to write a shell script file for the below subject
subject / situation : i have many users say user1, user2, user3, user4 and so on... within my /home dir
Within a user dir say.. /home/user1 i have many unwanted files. these unwanted files start with the name core for eg. core2324, core9789, core 9079 etc.. i need to delete them.
I want to write an automated script for this, which can do the same. How to write a script which can delte these unwanted core files which exist in all user dirs.
View 12 Replies
View Related
Jun 26, 2011
I have the following problem. I call a C++ program from a Java servlet by using Runtime exec. The OS is ubuntu and I use Netbeans 7.0 with Glassfish 3.1 web server.The program executes but it does not open and write into a specified file in a specified folder. The same C++ program compiled under Windows opens and writes this file.How can I solve this problem in Linux?
View 2 Replies
View Related
Dec 22, 2009
On Monday i had Centos 5.3 with / and /home in ext3, with no problems (at least i don't remember any problem).But as I decided to use XFS (I have a SSD , and i use a 3D Modeling software called Maya , that it's quite sure it could take advantage of use XFS), i decided to create in my new Solid State Disk , that i recently bought , a swap , a / partition formated in XFS , and a /home partition in XFS too.Then I used a Live cd to copy the contents from the old HDD to the new SSD , using find and Rsync --> (cd /mnt/oldroot/ ; find . -xdev -print0 | rsync -avHx --exclude-from /mnt/rsync-filter . /mnt/newroot/)
Once done , i edited fstab,Menu.lst , install grub in the MBR and i had to use mkinitrd to load the XFS.ko so be able to boot with the new system.All worked fine , although i only could log with the root , my normal user could not log , and a error appeared : GDM could not write your authorization file.This could mean that you are out of disk space or that your home directory could not be opened for writing.In any case it is not possible to login. Contact system administrator.But i remember that prior to Copy all to the new SSD , and use XFS , all was fine, and i was able to log with my user.
So thinking that perhaps the copy did by Rsync was not ok , or something i decided to reinstall Centos, now in a partition in my SSD and try another time , but without using a /home partition neither a normal user ,only using root.The SSD had a Swap , a 32 GB XFS partition and the / of the new Install in ext3 (20 GB ).Once installed Centos 5.3 , I updated only Glibc , yum and Python packages (like said in Centos 5.4 Release notes recommends , but not doing the final yum update)Then i updated only the kernel , to have a XFS supported Kernel , and then i rebooted (I would update all once migrated to xfs)
View 6 Replies
View Related