Sponsored Content
Operating Systems Linux deleting only directory not files Post 302191335 by hasanatizaz on Friday 2nd of May 2008 08:17:30 AM
Old 05-02-2008
damn,
i was just experimenting rm -rf */
i just typed /*
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Accidentally deleting directory/files

Hi, I accidentally deleted a big directory with all its sub-directories and bunch of source code files which I have been developing for about 2 years... What will I do now, how can I retrieve my files, directory hierarchy back ??? If anyone, please HELP ! ! ! ... (4 Replies)
Discussion started by: milhan
4 Replies

2. Shell Programming and Scripting

shell script: deleting files from a directory

i have the following problem: use shell script: Two directories have to be searched for files havin the same name. then delete these files from one of these directories. the directory names have to be accepted as command line arguments. what i have done till now is: 1. run a loop... (1 Reply)
Discussion started by: onlyc
1 Replies

3. Shell Programming and Scripting

deleting empty files in a directory

Hello Gurus, I want to delete only empty files (files with 0 bytes) at once from the local directory. Rightnow I need to go through all the files one by one manually and check the empty files before deleting them. Is there any unix command that finds and deletes empty files in a directory?... (5 Replies)
Discussion started by: berlin_germany
5 Replies

4. UNIX for Dummies Questions & Answers

deleting specific lines from all files in a directory

I have a directory full of text data files. Unfortunately I need to get rid of the 7th and 8th line from them all so that I can input them into a GIS application. I've used an awk script to do one at a time but due to the sheer number of files I need some kind of loop mechanism to automate... (3 Replies)
Discussion started by: vrms
3 Replies

5. Shell Programming and Scripting

Deleting the file only to all the directory and sub directory

I need the unix command or shell script to delete all the file in current directory and sub directory. (7 Replies)
Discussion started by: kingganesh04
7 Replies

6. UNIX for Dummies Questions & Answers

deleting all the files inside a directory from a relative path

I have a file inside abc/def/ghi directory. let say a.txt I need to delete this a.txt from abc itself. I have tried ls /abc/def/ghi | xargs rm -r its saying rm: a.txt non-existent also tried rm -rf /def/ghi but in vein. plz help :) (2 Replies)
Discussion started by: gotam
2 Replies

7. Shell Programming and Scripting

AIX system.... deleting files in remote directory after retrieving files

Hi Friends, I am new to this , I am working on AIX system and my scenario is to retrive the files from remote system and remove the files from the remote system after retreving files. I can able to retrieve the files but Can't remove files in remote system. Please check my code and help me out... (3 Replies)
Discussion started by: vinayparakala
3 Replies

8. Shell Programming and Scripting

Shell : deleting only first 2 files in a directory

I have 4 files in a directory and want to delete only first 2 files only.. $ ls -ltr total 640 -rw-r--r-- 1 user other 148779 Oct 12 10:50 file1.xls -rw-r--r-- 1 user other 148779 Oct 12 10:50 file2.xls -rw-r--r-- 1 user other 148779 Oct 12 10:50 file3.xls... (4 Replies)
Discussion started by: giridhar276
4 Replies

9. Shell Programming and Scripting

Deleting files and directory's older than 3 months

I have a qnap TS259 that is running ubuntu. Have successfully setup back scripts that are initiated by cron. I would like to create a couple scrypts that would operate on the recycle bins for both drives. Just want to be able to run the script manually that would walk through both directories... (13 Replies)
Discussion started by: mackconsult
13 Replies

10. UNIX for Dummies Questions & Answers

Deleting a directory and zipping another directory

Hi Folks, I have a directory in unix that is /usr/local/pos contain the folowing directoreis ..that is dir1 dir2 dir3 now I want to delete only dir2 please advise how to remove the directory dir 2 ..that is rm command and how to use it , and second if I want to zip the dir3 please... (1 Reply)
Discussion started by: punpun66
1 Replies
POSIX_TYPED_MEM_GET_INFO(3P)				     POSIX Programmer's Manual				      POSIX_TYPED_MEM_GET_INFO(3P)

PROLOG
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the correspond- ing Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux. NAME
posix_typed_mem_get_info - query typed memory information (ADVANCED REALTIME) SYNOPSIS
#include <sys/mman.h> int posix_typed_mem_get_info(int fildes, struct posix_typed_mem_info *info); DESCRIPTION
The posix_typed_mem_get_info() function shall return, in the posix_tmi_length field of the posix_typed_mem_info structure pointed to by info, the maximum length which may be successfully allocated by the typed memory object designated by fildes. This maximum length shall take into account the flag POSIX_TYPED_MEM_ALLOCATE or POSIX_TYPED_MEM_ALLOCATE_CONTIG specified when the typed memory object represented by fildes was opened. The maximum length is dynamic; therefore, the value returned is valid only while the current mapping of the corre- sponding typed memory pool remains unchanged. If fildes represents a typed memory object opened with neither the POSIX_TYPED_MEM_ALLOCATE flag nor the POSIX_TYPED_MEM_ALLOCATE_CONTIG flag specified, the returned value of info->posix_tmi_length is unspecified. The posix_typed_mem_get_info() function may return additional implementation-defined information in other fields of the posix_typed_mem_info structure pointed to by info. If the memory object specified by fildes is not a typed memory object, then the behavior of this function is undefined. RETURN VALUE
Upon successful completion, the posix_typed_mem_get_info() function shall return zero; otherwise, the corresponding error status value shall be returned. ERRORS
The posix_typed_mem_get_info() function shall fail if: EBADF The fildes argument is not a valid open file descriptor. ENODEV The fildes argument is not connected to a memory object supported by this function. This function shall not return an error code of [EINTR]. The following sections are informative. EXAMPLES
None. APPLICATION USAGE
None. RATIONALE
An application that needs to allocate a block of typed memory with length dependent upon the amount of memory currently available must either query the typed memory object to obtain the amount available, or repeatedly invoke mmap() attempting to guess an appropriate length. While the latter method is existing practice with malloc(), it is awkward and imprecise. The posix_typed_mem_get_info() function allows an application to immediately determine available memory. This is particularly important for typed memory objects that may in some cases be scarce resources. Note that when a typed memory pool is a shared resource, some form of mutual-exclusion or synchronization may be required while typed memory is being queried and allocated to prevent race conditions. The existing fstat() function is not suitable for this purpose. We realize that implementations may wish to provide other attributes of typed memory objects (for example, alignment requirements, page size, and so on). The fstat() function returns a structure which is not extensible and, furthermore, contains substantial information that is inappropriate for typed memory objects. FUTURE DIRECTIONS
None. SEE ALSO
fstat(), mmap(), posix_typed_mem_open(), the Base Definitions volume of IEEE Std 1003.1-2001, <sys/mman.h> COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technol- ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html . IEEE
/The Open Group 2003 POSIX_TYPED_MEM_GET_INFO(3P)
All times are GMT -4. The time now is 07:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy