Sponsored Content
Top Forums UNIX for Dummies Questions & Answers To Know this find and delete will work ???.. Post 302153814 by ranj@chn on Thursday 27th of December 2007 12:17:09 AM
Old 12-27-2007
Correction

Quote:
As "arun", you may not be able to delete my file named "junk.txt", unless you are logged in as the file owner or as root, even if the file is in a directory where you have full read/write/execute permissions.
if I am in a directory where I have full read/write/execute permissions, I should be able to delete the file even if I am not owner of that file.
Code:
rkumar@bdc4reteaix1w: /home/rkumar/unix_forum >touch file2del
rkumar@bdc4reteaix1w: /home/rkumar/unix_forum >ls -l file2del
-rw-r--r--   1 rkumar   dev               0 Dec 27 09:42 file2del
rkumar@bdc4reteaix1w: /home/rkumar/unix_forum >ls -ld
drwxrwxrwx   2 rkumar   dev            4096 Dec 27 09:42 .
rkumar@bdc4reteaix1w: /home/rkumar/unix_forum >su - oretail
oretail's Password:
[YOU HAVE NEW MAIL]
oretail@bdc4reteaix1w: /home/oretail >id
uid=205(oretail) gid=205(dev) groups=201(osdba),202(osoper),203(oinstall)
oretail@bdc4reteaix1w: /home/oretail >cd ~rkumar/unix_forum
oretail@bdc4reteaix1w: /home/rkumar/unix_forum >ls -l file2del
-rw-r--r--   1 rkumar   dev               0 Dec 27 09:42 file2del
oretail@bdc4reteaix1w: /home/rkumar/unix_forum >ls -ld
drwxrwxrwx   2 rkumar   dev            4096 Dec 27 09:42 .
oretail@bdc4reteaix1w: /home/rkumar/unix_forum >rm file2del
rm: Remove file2del? y
oretail@bdc4reteaix1w: /home/rkumar/unix_forum >ls -l file2del
ls: 0653-341 The file file2del does not exist.

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to find size of each subdirect? du -sk | ls doesn't work

Using solaris 2.5.1, and how can I get a summary of the size of each subdirectory, say for /export/home, all the users? usually I do a du -sk dirname but I have to manually type in each name, is there a better way? Thanks, (3 Replies)
Discussion started by: kymberm
3 Replies

2. AIX

does find command always work ?!

hello ! can so help me ? here is my problem : a same command, using find command works on a server, but doesn't on another. I've been told, that it could be because of the file systems ... it's amazing ! can so explain, please ? thank you for your answer (1 Reply)
Discussion started by: chocolate
1 Replies

3. Shell Programming and Scripting

find & sed -i work fine. Now need -i workaround for old OS.

I have a script that does a search and replace on a tree using find, xargs and sed that looks something like this. find . -type f -print0 | xargs -0 sed -i 's/fromthis/tothis/g' Now this works fine on new versions on Linux but I need to make the script work on an old RAQ550 that has an older... (3 Replies)
Discussion started by: simonb
3 Replies

4. Shell Programming and Scripting

find command with exec doesnt work

Hi There, I have a script which finds for log files and removes them if the file has changed in the last day. The script runs fine without errors. The log file is still there. So, I decided to print the find command and run the command outside the script. Getting "Incomplete statement" Can you... (6 Replies)
Discussion started by: funtochat2002
6 Replies

5. Shell Programming and Scripting

find options don't work in script

Hi, I'm trying to write a bash script to find some files. However it seems that the find command is not behaving the same way when the script is executed as it does when executed from the command line: Script extract: #!/bin/bash ... NEW="/usr/bin/find current/applications/ -name '*jar'... (3 Replies)
Discussion started by: mattd
3 Replies

6. AIX

Force delete key to work in aix ksh ?

I'm using AIX console over putty. I'm not very happy with default ksh command editing capabilities so I forced insert mode, arrow keys and command history by issuing: set -o emacs alias __D=`echo "\002"` alias __C=`echo "\006"` in emacs mode history works using ctrl+p, so only thing... (2 Replies)
Discussion started by: vilius
2 Replies

7. Shell Programming and Scripting

Delete all line breakes from File doesnt work

Hi, I have to delete all line breakes but it doenst work. $ sed -e 's/\\n//g' file.txt and the output contents still line breakes. What should I do? sincerely, Blackbox (3 Replies)
Discussion started by: Blackbox
3 Replies

8. UNIX for Dummies Questions & Answers

find command in shell script doesn't work

Hello all, Something strange going on with a shell script I'm writing. It's trying to write a list of files that it finds in a given directory to another file. But I also have a skip list so matching files that are in that skip list should be, well uhm, skipped :) Here's the code of my... (2 Replies)
Discussion started by: StijnV
2 Replies

9. Shell Programming and Scripting

Why regex pattern doesn't work in find?

$ find /opt/data_* -maxdepth 3 -type d -name "main*" 2> /dev/null /opt/data_025/maindblogs /opt/data_026/maindblogs /opt/data_027/maindblogs /opt/data_028/maindblogs $ find /opt/data_* -maxdepth 3 -type d -name "rvlogs*" 2> /dev/null /opt/data_002/prod/rvlogs2_archive... (4 Replies)
Discussion started by: urello
4 Replies

10. Shell Programming and Scripting

Find command does not work on AIX 6.1

I have AiX system version 6.1 I wish the below find command to work on AiX system ksh shell and give similar output as this works fine on RedHat Linux centos 7. find /app/logs/fname1.out -printf "%M %u %TY-%Tm-%Td %TH:%TM %h/%f $(cksum<fname1.out | cut -d' ' -f1)\n" Output: -rw-r--r--... (7 Replies)
Discussion started by: mohtashims
7 Replies
set directory to skulk(1m)												set directory to skulk(1m)

NAME
set directory to skulk - Starts the skulk of a directory immediately SYNOPSIS
cdscp set directory directory-name to skulk ARGUMENTS
The full name of the directory. DESCRIPTION
The set directory to skulk command starts the skulk of a directory immediately. The CDS control program prompt cdscp> does not return until the skulk is complete. The amount of time for the skulk to complete is dependent on the location, number, and availability of repli- cas of the directory. Privilege Required You must have administer, write, insert, or delete permission to the directory. The server principal needs administer, read, and write permission to the directory. NOTE
This command is replaced at Revision 1.1 by the dcecp command and may not be provided in future releases of DCE. EXAMPLE
The following command initiates a skulk on the /.:/admin directory: cdscp> set directory /.:/admin to skulk RELATED INFORMATION
Commands: add directory(1m), create directory(1m), delete directory(1m), list directory(1m), remove directory(1m), set directory to new epoch(1m), show directory(1m) set directory to skulk(1m)
All times are GMT -4. The time now is 03:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy