Software :: Tee Command In Sudoer File
Jul 26, 2011
I have previlige to use tee command with sudo. When I try to execute the tee command with sudo, system is asking root password. How can use tee with sudo without root password. Here is the command sudo tee file.When I execute the command system prompts for root password. I'm expecting system should prompt for individual id password.
View 1 Replies
ADVERTISEMENT
Jan 17, 2010
I an a relative linux newbie who just installed ubuntu 9.10 workstation (I have enstalled around 4 times on viurtual machines but generally do nothing with Ubuntu other than get Apache, MySql and php going) and was able to do most of want I wanted with the initial user (user1) using sudo.
It was painful however to work with Nautilis and Gedit, because everything i tried to do said I did not have the permissions.
I then added my user (the initial user) to group root. Nautilis and Gedit then allowed me to easily edit files (I only used to verify I COULD edit files - I did NOTactually edit any)
I then rebooted my computer and since then I cannot so anything with sudo. I get a message "user1 is not in the sudoers file". If I do groups user1 I can see user1 is listed as a member of user1 and root. However, Nautilis and Gedit respond with no permission to everything again.
I also cannot su to root because it says invalid password (I had not originally set a password for root but it will not accept leaving password blank and now it will not let me sudo to create a password).
what I need to do to make user1 work with sudo again?
View 6 Replies
View Related
Jul 5, 2010
whether I should encounter a problem relating to output redirection when using sed from a shell script which is ran by apache? I have given apache privileges in sudoers to run the shell script and the commands within it. However the problem is that when I check auth.log all commands are listed except the sed ones, yet if I run the shell script directly from the command line they work fine and are logged.
So although I realise I probably have some permission issues to solve, I think its strange how sed commands are not being logged at all. would also appreciate any advice on apache and sudoers, am I playing with fire here? Im on lucid 10.04 server
View 6 Replies
View Related
May 3, 2010
I need to kill a process which has been started by user2 if I am user1 without being sudoers or using root.Do you know if there is a way of setting that when launching the process? Such as a list of users allowed to kill the process?
View 7 Replies
View Related
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
May 3, 2010
My .jar file needs and uses some files in the same directory it's in (everything, including the jar was unzipped into said directory). It runs perfectly when I do java -jar file.jar in the command line, but there's trouble when I double-click the file when running from the file system manager. I've tried a custom command under properties ie java -jar, but the problem is that the .jar file doesn't seem to be able to use any of the files in the same directory. When running, the jar can't find any of the files that it needs.
View 5 Replies
View Related
Aug 23, 2011
I need to be able to convert HTML email messages saved as text files (.eml or .msg) to PDF documents, one PDF per email, retaining formatting and images.
Are there any Linux tools that will allow me to do this from the command line (so it can be scripted)?
View 1 Replies
View Related
Oct 14, 2010
I want to be able to check the contents of a text file for a specific string and remove it from the file from the command prompt. I would basically be searching through a number of files and if a specific string is found I would like it removed automatically. pretty much a find and replace, were the replace is nothing. any one got any ideas on how you would do this. I already have the search part sorted just need to be able to remove the string I don't want from the multiple files.
View 4 Replies
View Related
Nov 23, 2010
As in windows all the delted items will got to RecycleBin is there any such thing in linux.
(Or)
Can we retrive the file which got removed from file system(using rm command)
View 4 Replies
View Related
Mar 9, 2011
I am trying to grep multiple numbers from file, grep does have the -f option for that.
Code: grep -f <`seq 500 520` /etc/passwd I know this could be done with
Code: for i in `seq 500 520`; do grep "$i" /etc/passwd; done But my question is fare more behind this example. It is possible to redirect one command output which will be treat as a content of file for another command ?
View 2 Replies
View Related
Oct 28, 2010
I would like to convert a .ods file to a .csv file via command line on a server running ubuntu with no graphical interface.
xls2csv does a perfect job on xls files; is there something similar for ods files?
View 1 Replies
View Related
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
May 3, 2010
I download some movies those are with 'mkv' , but couldn't be played, I tried other players , like mplayer , dragon , xine, even swich OS to windows , didn't work . not all of those files , but some of them. one of them named 'the.other.man', 2GB.I opened a terminal and executed "file the.other.man.mkv "utput is "data", and command 'strings the.other.man.mkv", output like as follow:
T5}.
S!e
I|
[code]...
View 1 Replies
View Related
Jun 3, 2011
I am working on a model in which i need the individual cpu core usage. i found one command "top" and after pressing 1 on interactive mode it display the individual cpu usages but i am unable to store that output in a file. Is there any other command to find the individual cpu usages in "ubuntu" or any method to get the log file of top with individual cpu usages? Is there any method to input 1(works in interactive mode) through command line?
View 5 Replies
View Related
May 11, 2009
what i have is a list of words 6 to a line im trying to use the sed command to insert a comma in between each word and at the end of the last one
[code]....
the last line of the variable does not have 6 words what i have so far is this
Code:
words=`cat /usr/share/dict/words |grep "^[$list]*$" | xargs -n 6 echo | sed -e 's/[ ]+/,/g s/$/,/g'`
it dosent work though i originally started off with
Code:
words=`cat /usr/share/dict/words |grep "^[$list]*$" | xargs -n 6 echo | sed -e 's/[ ]+/,/g' this puts a comma inbetween them but takes out the space and dosent put a comma at the end of the line.. basicaly what i needed to know is how i could you multiple sed commands to fix this
View 12 Replies
View Related
Mar 23, 2011
I would love to start using the new Firefox. How would I go about adding the repository and installing? What would I add? Or better yet, what is the command for unpacking a tar.bz2 file?
View 14 Replies
View Related
Jun 24, 2010
Recently I've started to learn cpp language on linux,and now I run a cpp file using following commands. g++ -o xxx xxx.cpp./xxxIs there a way to make it one line command such as compile-and-run xxx.cpp?
View 5 Replies
View Related
Jul 7, 2010
It says to run update.php from the maintenance folder. What command do I type to run an update file?
View 5 Replies
View Related
Aug 27, 2010
I want a quick and simple way to execute a command whenever a file changes. I want something very simple, something I will leave running on a terminal and close it whenever I'm finished working with that file. Currently, I'm using this: while read; do ./myfile.py ; done And then I need to go to that terminal and press Enter, whenever I save that file on my editor. What I want is something like this: while sleep_until_file_has_changed myfile.py ; do ./myfile.py ; done
Or any other solution as easy as that. BTW: I'm using Vim, and I know I can add an autocommand to run something on BufWrite, but this is not the kind of solution I want now. Update: I want something simple, discardable if possible. What's more, I want something to run in a terminal because I want to see the program output (I want to see error messages).
View 7 Replies
View Related
Mar 13, 2010
I have this file: 1.txt, with this contents:
Code:
test
mycomputer
I just try change the string "mycomp*" by "othercomputer":
Code:
sed 's/mycomp.*$/othercomputer/' 1.txt > 1.txt
but sed command empty the file.
[Code].....
View 2 Replies
View Related
May 9, 2010
I'm looking for an mp3 file in the firefox cache folder.I was thinking I could run the command 'find -size +2M' and pipe that output into the 'file' command to tell me which is an mp3, something like thisfind -size +2M | fileBut this doesn't work, what am I doing wrong?This is output Usage: file [-bcikLhnNrsvz0] [-e test] [-f namefile] [-F separator] [-m magicfiles] file...file -C -m magicfilesTry `file --help' for more information.
View 4 Replies
View Related
Apr 18, 2011
I am always confused about the redirection operator <Lets say i have a file input.txt that contains one word "hello" without the quotes when i do the following why don't i see any output? $echo < input.txt Secondly, i am slightly confused between input redirection < and pipe | operator. Sometimes they seem to do the same thing. For example i can achieve the output from the above command as follows $ cat input.txt | xargs echo
View 2 Replies
View Related
Mar 20, 2010
How do I use my SSH Terminal to get a file that is sittng on another server that I have.. As its like 500 megs or so but to download it to my computer then upload it it takes a long time..
So this is what i have done so far
1. Loged in to SSH Terminal
2. Went to my DIR that i want to put the FILE to
3. Typed in FTP
4. I"M LOST now as i'm trying to connect using my user on my ftp site (DIFFERN"T SERVER)
I relly need the key commands SHH Terminal for dummies
View 3 Replies
View Related
Oct 24, 2010
I am using the BackTrack 4 Live CD...and when I entered the "cat" command, it told me that no such command existed. I made absolutely sure that I a entering the command correctly. It just comes up with the word cat in quotes and says "no such file" or "no such command" something of that nature.
View 2 Replies
View Related
Mar 31, 2011
I need to check the file name e.g. testbla_word.txt
Is theire a command to search for only "bla_"?
So mainly, to check a part of a filename (not the entire filename, only a part of it)
View 5 Replies
View Related
Oct 4, 2010
I have installed cygwin 1.7.5. But the command "file" (check the type of a file) is missing. I tried to re-install, but could not find it on installation program. Where is it?
View 2 Replies
View Related
Jan 15, 2010
I have a number of files.tar.gz that I have to gunzip to get .tar then I tar -xvf .tar, to get a readable file. Is there a way to do that all in one command. I tried to pipe it being new and all and I get errors.
View 2 Replies
View Related
Dec 21, 2010
How to send an ordinary file as well as an Excel file as an attachment while sending mail in redhat.
View 5 Replies
View Related
Jun 25, 2010
I was trying to extract a file by using this command cpio -idmvz <file.cpio.gz> but system hangs. Nothing gets extracted.
View 3 Replies
View Related
Dec 2, 2009
How can I retrieve the file in LINUX which I have deleted using 'rm' command .???
View 1 Replies
View Related