Sponsored Content
Full Discussion: Not able to delete a dir !!!
Top Forums UNIX for Dummies Questions & Answers Not able to delete a dir !!! Post 302595223 by Hangman2 on Thursday 2nd of February 2012 11:39:16 AM
Old 02-02-2012
This is a sandbox and Informatica was shut down normally.

I have to check with my UNIX Admin to see if backup was done or not.

When I issue the command: ps, then the I see a process if for my login session.

So when I do fuser -ck dir/subdir then it kills the unix login session.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

a script to clone a dir tree, & overwrite the dir struct elsewhere?

hi all, i'm looking for a bash or tcsh script that will clone an empty dir tree 'over' another tree ... specifically, i'd like to: (1) specify a src directory (2) list the directory tree/hiearchy beneath that src dir, w/o files -- just the dirs (3) clone that same, empty dir hierarchy to... (2 Replies)
Discussion started by: OpenMacNews
2 Replies

2. Solaris

Auto delete files in /tmp dir ???

I have a Solris 9 box my problem is when I restart my box all my files and dirs in /tmp dir will be deleted exept 2 directories I found them since installation phase !!!! How to keep my files at that dir " /tmp " even after restarting ??? (1 Reply)
Discussion started by: DarkSoul
1 Replies

3. UNIX for Dummies Questions & Answers

Based on the permision in the dir can i delete the file

All, I am having a directory as drwxrwsr-x 3 intermec intermec 10240 Jan 8 09:07 intermec inside the directory . the files are like cd -rw-r----- 1 intrmc01 intermec 5226 Dec 2 15:03 AST07356.txt -rw-r----- 1 intrmc01 intermec 5025 Dec 2 12:51... (4 Replies)
Discussion started by: arunkumar_mca
4 Replies

4. Shell Programming and Scripting

Delete an empty file from dir.

Hi, I have an dir which has 50K file, some of them are empty. I want to delete the empty file from the dir. I am planning to use the following command. ls -l | grep " 0 " | awk '{print $9}' I can copy this to an file and then how do I use this file to delete the empty files.... Any help... (2 Replies)
Discussion started by: Script40
2 Replies

5. Shell Programming and Scripting

How to delete files in specific dir

I've got a problem how to delete files from specific directory. I don't want do it recursively but only in specific directory. So, command like find /home/dirname/ -mtime +8 -type f -exec rm {} \; is not for me because this command will remove ifs files in /home/dirname and all... (2 Replies)
Discussion started by: zukes
2 Replies

6. Shell Programming and Scripting

A script to find dir, delete files in, and then del dir?

Hello!! I have directories from 2008, with files in them. I want to create a script that will find the directoried from 2008 (example directory: drwxr-xr-x 2 isplan users 1024 Nov 21 2008 FILES_112108), delete the files within those directories and then delete the directories... (3 Replies)
Discussion started by: bigben1220
3 Replies

7. UNIX for Dummies Questions & Answers

How to list all files in dir and sub-dir's recursively along with file size?

I am very new to unix as well as shell scripting. I have to write a script for the following requirement. In have to list all the files in directory and its sub directories along with file path and size of the file Please help me in this regard and many thanks in advance. (3 Replies)
Discussion started by: nmakkena
3 Replies

8. Shell Programming and Scripting

Any command to delete files from source dir after SFTP copy

Hi, I am currently using SFTP 'put' command to copy all files to remote server and then delete the copied files from source directory. Can anyone help me with a single command to copy and remove files in one go? Thanks and Regards, Chetan Vyas (5 Replies)
Discussion started by: chetancrsp18
5 Replies

9. UNIX Desktop Questions & Answers

How to delete dir and sub dir

Guys, can you tell me how to delete directory and sub directory with files in them, for example: /system/upgrade/title/sub/var/vito/ I would like to delete 'title' and everything under it. Every sub dir contains files which need to be deleted as well. Thanks (1 Reply)
Discussion started by: DallasT
1 Replies

10. AIX

Assign read write permission to the user for specific dir and it's sub dir and files in AIX

I have searched this quite a long time but couldn't find the right method for me to use. I need to assign read write permission to the user for specific directories and it's sub directories and files. I do not want to use ACL. I do not want to assign user the same group of that directories too.... (0 Replies)
Discussion started by: blinkingdan
0 Replies
SD_PID_GET_SESSION(3)						sd_pid_get_session					     SD_PID_GET_SESSION(3)

NAME
sd_pid_get_session, sd_pid_get_unit, sd_pid_get_owner_uid - Determine session, service or owner of a session of a specific PID SYNOPSIS
#include <systemd/sd-login.h> int sd_pid_get_session(pid_t pid, char** session); int sd_pid_get_unit(pid_t pid, char** unit); int sd_pid_get_owner_uid(pid_t pid, uid_t* uid); DESCRIPTION
sd_pid_get_session() may be used to determine the login session identifier of a process identified by the specified process identifier. The session identifier is a short string, suitable for usage in file system paths. Note that not all processes are part of a login session (e.g. system service processes, user processes that are shared between multiple sessions of the same user, or kernel threads). For processes not being part of a login session this function will fail. The returned string needs to be freed with the libc free(3) call after use. sd_pid_get_unit() may be used to determine the systemd unit (i.e. system service) identifier of a process identified by the specified process identifier. The unit name is a short string, suitable for usage in file system paths. Note that not all processes are part of a unit/service (e.g. user processes, or kernel threads). For processes not being part of a systemd unit/system service this function will fail. The returned string needs to be freed with the libc free(3) call after use. sd_pid_get_owner_uid() may be used to determine the Unix user identifier of the owner of the session of a process identified the specified PID. Note that this function will succeed for user processes which are shared between multiple login sessions of the same user, where sd_pid_get_session() will fail. For processes not being part of a login session and not being a shared process of a user this function will fail. If the pid paramater of any of these functions is passed as 0 the operation is executed for the calling process. RETURN VALUE
On success these calls return 0 or a positive integer. On failure, these calls return a negative errno-style error code. NOTES
The sd_pid_get_session(), sd_pid_get_pid(), and sd_pid_get_owner_uid() interfaces are available as shared library, which can be compiled and linked to with the libsystemd-login pkg-config(1) file. Note that the login session identifier as returned by sd_pid_get_session() is completely unrelated to the process session identifier as returned by getsid(2). SEE ALSO
systemd(1), sd-login(7), sd_session_is_active(3), getsid(2) AUTHOR
Lennart Poettering <lennart@poettering.net> Developer systemd 10/07/2013 SD_PID_GET_SESSION(3)
All times are GMT -4. The time now is 09:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy