12-30-2008
i want to remove only the files not the directory
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
This must be simple! How do you delete a directory that contains other files and directories?:confused: (2 Replies)
Discussion started by: firefinger
2 Replies
2. Programming
I have a number of files of the format filename.xfr_mmddyy_%H%M%S which i get in a specified directory daily. Now i want to search in the specified directory & delete the files which are more than 2 days old .So I use a command
find $DIR/backup/* -ctime +2 -exec rm -f {} \;
But after executing... (1 Reply)
Discussion started by: dharmesht
1 Replies
3. Shell Programming and Scripting
Hey! I have found similar posts both here and on other sites regarding this, but I cannot seem to get my script to work. I want to delete the oldest file in a test directory if there are more than two files. My script is currently:
#!/bin/bash
MEPATH=/usr/local/bin/test
FILECOUNT=`ls... (4 Replies)
Discussion started by: Immolation
4 Replies
4. Shell Programming and Scripting
Hi All,
I have to maintain few servers and in those servers in a specific directory some special jobs keeps on running .......
The directory is having many kind of files like.....acd*, hud*, rca*....bla bla bla.......
My aim is that if due to any job-any time a file having initials like... (4 Replies)
Discussion started by: jitendra.pat04
4 Replies
5. Shell Programming and Scripting
got it figured out :) (1 Reply)
Discussion started by: sHockz
1 Replies
6. Shell Programming and Scripting
I am trying to do the following task :
export ENV=aaa
export ENV_PATH=$(cd /apps | ls | grep $ENV)
However, it's not working. What's the way to change to directory and search some file in that directory in single command
Please help. (2 Replies)
Discussion started by: saurau
2 Replies
7. UNIX for Dummies Questions & Answers
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
8. Shell Programming and Scripting
I need a script which should watch a directory for a file with specific directory.
If it finds a file in directory, it should search for few specific keyword in the file. if the keyword exists, it should trim string from specific column.
The file should be moved to another directory and the a... (8 Replies)
Discussion started by: akashdeepak
8 Replies
9. AIX
I have a directory under my home directory called: my work. I cannot delete this directory and I want to.
If anyone needs additional information. Please let me know.
Any help you can provide is greatly appreciated. (8 Replies)
Discussion started by: Nerdgirl1313
8 Replies
10. Shell Programming and Scripting
I have a script, which is checking if file exists and move it to another directory
if
then
mkdir -p ${LOCL_FILES_DIR}/cool_${Today}/monthly
mv report_manual_alloc_rpt_A_I_ASSIGNMENT.${Today}*.csv ${LOCL_FILES_DIR}/cool_${Today}/monthly
... (9 Replies)
Discussion started by: digioleg54
9 Replies
PWD(1) BSD General Commands Manual PWD(1)
NAME
pwd -- return working directory name
SYNOPSIS
pwd [-LP]
DESCRIPTION
pwd writes the absolute pathname of the current working directory to the standard output.
The following options are available:
-L If the PWD environment variable is an absolute pathname that contains neither "/./" nor "/../" and references the current directory,
then PWD is assumed to be the name of the current directory.
-P Print the physical path to the current working directory, with symbolic links in the path resolved.
The default for the pwd command is -P.
pwd is usually provided as a shell builtin (which may have a different default).
EXIT STATUS
The pwd utility exits 0 on success, and >0 if an error occurs.
SEE ALSO
cd(1), csh(1), ksh(1), sh(1), getcwd(3)
STANDARDS
The pwd utility is expected to be conforming to IEEE Std 1003.1 (``POSIX.1''), except that the default is -P not -L.
BUGS
In csh(1) the command dirs is always faster (although it can give a different answer in the rare case that the current directory or a con-
taining directory was moved after the shell descended into it).
pwd -L relies on the file system having unique inode numbers. If this is not true (e.g., on FAT file systems) then pwd -L may fail to detect
that PWD is incorrect.
BSD
October 30, 2003 BSD