Sponsored Content
Operating Systems Linux Debian Problem with files/dirs deletion Post 302772625 by Don Cragun on Tuesday 26th of February 2013 08:53:01 AM
Old 02-26-2013
You say you don't have access to root, but when you installed this software it was able to create a new user-ID (username-www). To remove files owned by username-www, you'll need to su to username-www or to some other account (like root) that has the privileges needed to remove files owned by someone else. (Note that depending on directory permissions, it may be enough to be in a group that has write/delete permissions for the directory or directories containing the files to be removed.)
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

I need to ls all files in 4-6 deep dirs

I need to print to file , a listing of all files below a certain directory. Example: I need to print to file a listing of all files below the etc dir (including the subdirectories) with their full path. Any ideas on how to do this with one command. Or is this something I need to do on all... (4 Replies)
Discussion started by: gforty
4 Replies

2. UNIX for Dummies Questions & Answers

file deletion problem

I am using unix via telnet ssh and i have a problem I was testing the server. I made a directory. Transfered a file from an ftp to it. Opened the file with the vi text editor --This where my problem came..... I tried deleting the file using rm somefile.htm when is typed ls i noticed that... (2 Replies)
Discussion started by: shdwsclan
2 Replies

3. Filesystems, Disks and Memory

fifo deletion problem..

I have unix sco server. I have created one application for client server communication. On this I have creted some fifos/pipes. The reader.123 fifo is used by one process for reading and writing. I haven't deleted that fifo. But ls or find command doesn't show it. It is giving error as file or... (1 Reply)
Discussion started by: yogeshdimble
1 Replies

4. Shell Programming and Scripting

script find files in two dirs HELP

I have a directory which is /home/mark/files/ , inside this particular I have a bunch of filles (see examples below) TST_SHU_00014460_20090302.txt TST_SHU_00016047_20090302.txt TST_SHU_00007838_20090303.txt TST_SHU_00056485_20090303.txt TST_SHU_00014460_20090303.txt... (2 Replies)
Discussion started by: fierusbentus
2 Replies

5. Shell Programming and Scripting

Find most recent files in dirs and tar them up?

Hey all.. This should be simple but stoopid here can't get head around it! I have many directories, say 100 each with many files inside. I need a script to traverse through the dirs, find most recent file in each dir and add it to a tar file. I can find the files with something like for... (1 Reply)
Discussion started by: bobdung
1 Replies

6. Shell Programming and Scripting

Have absolute path for files in different dirs

Hi everybody. I need a command to print the absolute path of files which name starts always with a pattern (MOD03), independently on where they are in the filesystem. I have tryedls -ld ${INPUTPREFIX}/*/*/* | grep MOD03 | awk '{ print $8 }'but I have to use "/*/*/*" in this case to have the... (5 Replies)
Discussion started by: canduc17
5 Replies

7. Shell Programming and Scripting

sort retrieved data files in different dirs

Hi, I have a script to retrieve data files from server and store them in a directory on local disk. The script runs everyday as cron job. But now those files are too many so my boss wants me to put the files into different directories base on dates. Those files look like this: ... (4 Replies)
Discussion started by: leafei
4 Replies

8. Shell Programming and Scripting

AWK help print dirs with files in it

Hi, I'm writing some start of day checks for my work. I want to check some dirs for files that have been created longer than 10 mins ago and not been transfered. I've already used a find command to write a list of files that meet this criteria to a log called sod.log i.e. ... (1 Reply)
Discussion started by: elcounto
1 Replies

9. Shell Programming and Scripting

Moving files into dirs corresponding to dates

I am trying to find a way to move files into corresponding date files. i=0 while read line do array="$line" (( i++ )) done < <(ls) cd $(echo ${array}) echo ${array}} pwd #cd "$(array}" ] || mkdir 2015 cd "2015" ] || mkdir 02-February ] || mkdir 03-March ] || mkdir... (10 Replies)
Discussion started by: newbie2010
10 Replies

10. Shell Programming and Scripting

Replace a string in files in all dir and sub dirs

Hello, I need to replace xml version='1.1' with xml version='1.0' in all xml files under /app/jenkins/ in all dir and sub dirs in my CentOS VM, I tried below command but it didn't help, looks like I'm missing a character somewhere. grep -rl "xml version='1.1'" . | xargs sed -i 's/"xml... (2 Replies)
Discussion started by: mahesh Madpathi
2 Replies
DELUSER(8)                                                    System Manager's Manual                                                   DELUSER(8)

NAME
deluser, delgroup - remove a user or group from the system SYNOPSIS
deluser [options] [--force] [--remove-home] [--remove-all-files] [--backup] [--backup-to DIR] user deluser --group [options] group delgroup [options] [--only-if-empty] group deluser [options] user group COMMON OPTIONS [--quiet] [--system] [--help] [--version] [--conf FILE] DESCRIPTION
deluser and delgroup remove users and groups from the system according to command line options and configuration information in /etc/deluser.conf and /etc/adduser.conf. They are friendlier front ends to the userdel and groupdel programs, removing the home directory as option or even all files on the system owned by the user to be removed, running a custom script, and other features. deluser and del- group can be run in one of three modes: Remove a normal user If called with one non-option argument and without the --group option, deluser will remove a normal user. By default, deluser will remove the user without removing the home directory, the mail spool or any other files on the system owned by the user. Removing the home directory and mail spool can be achieved using the --remove-home option. The --remove-all-files option removes all files on the system owned by the user. Note that if you activate both options --remove-home will have no effect because all files including the home directory and mail spool are already covered by the --remove-all-files option. If you want to backup all files before deleting them you can activate the --backup option which will create a file username.tar(.gz|.bz2) in the directory specified by the --backup-to option (defaulting to the current working directory). Both the remove and backup options can also be activated for default in the configuration file /etc/deluser.conf. See deluser.conf(5) for details. If you want to remove the root account (uid 0), then use the --force parameter; this may prevent to remove the root user by accident. If the file /usr/local/sbin/deluser.local exists, it will be executed after the user account has been removed in order to do any local cleanup. The arguments passed to deluser.local are: username uid gid home-directory Remove a group If deluser is called with the --group option, or delgroup is called, a group will be removed. Warning: The primary group of an existing user cannot be removed. If the option --only-if-empty is given, the group won't be removed if it has any members left. Remove a user from a specific group If called with two non-option arguments, deluser will remove a user from a specific group. OPTIONS
--conf FILE Use FILE instead of the default files /etc/deluser.conf and /etc/adduser.conf --group Remove a group. This is the default action if the program is invoked as delgroup. --help Display brief instructions. --quiet Suppress progress messages. --system Only delete if user/group is a system user/group. This avoids accidentally deleting non-system users/groups. Additionally, if the user does not exist, no error value is returned. This option is mainly for use in Debian package maintainer scripts. --only-if-empty Only remove if no members are left. --backup Backup all files contained in the userhome and the mailspool-file to a file named /$user.tar.bz2 or /$user.tar.gz. --backup-to Place the backup files not in / but in the directory specified by this parameter. This implicitly sets --backup also. --remove-home Remove the home directory of the user and its mailspool. If --backup is specified, the files are deleted after having performed the backup. --remove-all-files Remove all files from the system owned by this user. Note: --remove-home does not have an effect any more. If --backup is specified, the files are deleted after having performed the backup. --version Display version and copyright information. RETURN VALUE
0 The action was successfully executed. 1 The user to delete was not a system account. No action was performed. 2 There is no such user. No action was performed. 3 There is no such group. No action was performed. 4 Internal error. No action was performed. 5 The group to delete is not empty. No action was performed. 6 The user does not belong to the specified group. No action was performed. 7 You cannot remove a user from its primary group. No action was performed. 8 The required perl-package 'perl modules' is not installed. This package is required to perform the requested actions. No action was performed. 9 For removing the root account the parameter "--force" is required. No action was performed. FILES
/etc/deluser.conf Default configuration file for deluser and delgroup /usr/local/sbin/deluser.local Optional custom add-ons. SEE ALSO
adduser(8), deluser.conf(5), groupdel(8), userdel(8) COPYRIGHT
Copyright (C) 2000 Roland Bauerschmidt. Modifications (C) 2004 Marc Haber and Joerg Hoh. This manpage and the deluser program are based on adduser which is: Copyright (C) 1997, 1998, 1999 Guy Maor. Copyright (C) 1995 Ted Hajek, with a great deal borrowed from the original Debian adduser Copyright (C) 1994 Ian Murdock. deluser is free software; see the GNU General Public Licence version 2 or later for copying conditions. There is no warranty. Debian GNU/Linux Version 3.116ubuntu1 DELUSER(8)
All times are GMT -4. The time now is 07:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy