General :: Remove File From The Dir With Different Permisison?
May 25, 2011
Dir - test - ls -ld shows ls -ld testdrwxr-xr-x 2 joe stduser 4096 May 25 16:25 testinside test dir :-rw-r--r-- 1 admin stduser 0 May 25 16:25 a.txtHow to remove a.txt with out using sudo ..I just tried sudo -u admin rm test/a.txtrm: cannot remove `test/a.txt': Permission denied
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?
I installed the wrong file and now I would like to remove it. It was one of those .tar.gz files you have to install with ./configure, make, make install.I suspect files were installed all over the place.Is there a utility for removing a .tar.gz file ?
Code: [jonas@webserver html]$ ls -l | grep file -rw-rw-r-- 1 jonas jonas 3323 2010-03-15 20:33 file.php [jonas@webserver html]$ rm file.php rm: cannot remove 'file.php': Permission denied The directory that holds this file is html :
Situation as follows: i do su to root, then i create admin file with
cat > adminfile then i exit from root issuing exit command i can see following adminfile options -rw-r--r-- 1 root root 10 2010-06-16 16:25 adminfile however, after executing rm adminfile it really gets removed -rw-r--r-- 1 root root 10 2010-06-16 16:25 adminfile
[Code]...
As i see it - others have only read permision for that file so they shouldnot be able to remove it.. :/
I have got certain files which somehow contain abnormal character "Del" "0x7f" or 177 which represents Del. And this is causing SVN to reject these files and abruptly end the process. I need to remove those characters from the file names but am not able to. find or grep do not search the files. This is how the file looks like with ls or find code...
According to security manual only DNS, files, or LDAP should be allowed in nsswitch file however it seems like i have many other services configured in nsswitch files.
below are the content from nsswitch file. What services can be removed considering the system stability.
Code: passwd: files shadow: files group: files hosts: files dns
i want to remove words "Max" and "constrained" in a file given below:
Max 0.003745 constrained Max 0.004549 constrained Max 0.001689 constrained
[code]....
and further want to replace "Max" by line number so that i can plot the resulting file. i searched in forum, but couldn't do what i wanted to do. e.g. i used
If you create a file on UNIX/linux with special chars, like touch "la*, you can't remove it with rm "la*. You have to use the inode number(you can if you add the before the name, I know, but you'd have to guess as a user that it was used in the file creation).
I checked the manpage for rm, but there's no metion of the inode number. Doing rm inodenumber doesn't work either.
I've downloaded some files from the Internet Archive. They come in different file formats and most of the time I use pdf. However, sometimes the scans are saves in colour instead of b/w. This makes it difficult/impossible to read on a dedicated ebook reader. In that case I downloaded the djvu files as on the PC you can select which layer (color, bw,fore,back) one would like to see. Selecting the bw gives excellent results. However, the ebook reader does not has this option.
The question is, how can I remove /extract a layer from the djvu file and save only this layer.
So far I've tried the following two approaches:
1) select bw in the djvu viewer on the PC and printed to postscript file. Followed by a ps2pdf conversion. This works, but generates a fairly large pdf file. Sure, I can again upload it to any2djvu but it just seems to much manual work for each file.
2) I tried the shared annotation feature and said (mode bw). This works on the PC as desired but is ignored on the ebook reader as the other layers are still present.
Status for ACCOUNT_MISSING_FRM_RCIS_LINK- mismatch
Status for ACCOUNT_MISSING_FRM_RCIS_LINK is ACCOUNT_MISSING_FRM_RCIS_LINK- does not exist in DB
This should appear just once as :
Quote:
The same goes for last line.
For further information the ACCOUNT_MISSING_FRM_RCIS_LINK is a table name and it row count is taken from a log and then Database checked for the rowcount to see if it is a match,mismatch,or the table does not exist!
I am getting the desird output just that i need to do something to this output file.
I would like to create a cronjob that will delete all files within a directory 1 hours after it is created to the folderI found this cron find /path/to/file/* -ctime +1 -exec rm {} ; but it's deleted all files.I want to make an exception, all file should be deleted except one file (letsay file a.zip)
I am basically trying to remove duplicate words in my <title></title> tag after I got hit by Google Panda. I have around 750 .html files and it will be difficult for to me remove one by one. I am looking for a way to remove only from within <title> </title>
Example of a duplicate title I have:
Code:
<title>Pasta, Pasta Recipe and Pasta Guide</title>
I dont want to replace those words anywhere else in the file except for within the <title>
I'm hoping that someone can help me, I need to remove spaces (not replace with underscores) from several thousand files on a system with cygwin. Can I do this from the shell using rename or mv somehow?
how to delete a file or folder via apt-get remove but my written any rates and stops also tried rm and the file name again failed some sort of ideas otherwise I'm with Nokia n900
remove a line starting with specific word with grep. Here is what I found
grep -v '^cc$' data.txt
Here I remove all lines with on 'cc' in that line. But I want the result write back to data.txt
I try several ways
grep -v '^cc$' data.txt > output.txt # works but to another file echo `grep -v '^cc$' data.txt` > data.txt # didn't work, all carets gone, become one line grep -v '^cc$' data.txt > data.txt # data.txt is empty after running this
How can I save the result of grep to the input file?
It appears that a write protected socket was established as a symbolic link between an audio file and the binary of the audio itself. We are unable to remove the files and the holding folder. Attempted all possible combination of RM that I could think of and then graduated to shred. We are unable to do so code...
Trying to remove lines from a syslog text file that have duplicate strings
Mar 10 06:51:11[http-8080-1] INFO com.MYCOMPANY.webservices.userservice.web.UserServiceController [u:2533274802474744|360] Authorize [platformI$tformIdAndOs=2533274802474744|360, userRegion=America|360]
then a few lines down
Mar 10 06:52:03 [http-8080-1] INFO com.MYCOMPANY.webservices.userservice.web.UserServiceController [u:2533274802474744|360] Authorize [platformI$tformIdAndOs=2533274802474744|360, userRegion=America|360
got the same thing in terms of a u: number but the issue is I need to remove duplicates and just leave one and the file has multiple duplicates of different u: numbers and it's 14,000 lines long. can anyone tell me if I can use awk? sed? or sort for something like this to? removing lines that have a certain string in there that's a duplicate.