05-02-2013
dot - represents current directory
f - regular file
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have to capture the creation date and time stamp for a file. The ls command doesn't list all the required information. I need year, month, day, hour, minute and second.
Any ideas... (1 Reply)
Discussion started by: Xenon
1 Replies
2. UNIX for Dummies Questions & Answers
I am trying to insert a line with a date stamp in a file that is used to monitor activity in one of our directories. By doing this, I want to grep that file each day and go to the last entry for each time a error occurred and pull all errors generated if any exist. If error exists I want that error... (3 Replies)
Discussion started by: shephardfamily
3 Replies
3. Shell Programming and Scripting
Looking for a shell script or a simple perl script . I am new to scripting and not very good at it .
I have 2 directories . One of them holds a text file with list of files in it and the second one is a daily log which shows the file completion time. I need to co-relate both and make a report.
... (0 Replies)
Discussion started by: breez_drew
0 Replies
4. UNIX for Dummies Questions & Answers
Hi
When i do ls -ltr <file1> then it shows me the date and time of the file
if - for whatever reason file has future date/time stamp then ls -ltr is not showing the time, it just shows only date part ... even if time is ahead by 2 hr than current time.
suppose a file was copied from INDIA... (3 Replies)
Discussion started by: reldb
3 Replies
5. Shell Programming and Scripting
Hi
I use "touch -t xxxxxxxx" command to set date/time stamp of a file. My requirement is to read the date/time stamp of a file and apply it to another file.
Is there anyway to do it simple instead of manually taking date/stamp of first file?
TIA
Prvn (2 Replies)
Discussion started by: prvnrk
2 Replies
6. Shell Programming and Scripting
Hi!
Please see our current script:
#!/usr/bin/ksh
if (egrep "This string is found in the log" /a01/bpm.log)
then
mailx -s "Error from log" me@email.com, him@email.com </a01/bpm.log
fi
To the above existing script, we need to add the following change:
1) After finding the string,... (7 Replies)
Discussion started by: atechcorp
7 Replies
7. Shell Programming and Scripting
Hi All,
Please help.
I have requirement to read the file / folder based on the latest date and download the file and folder.
There will be files and folders in the location like
20140630-144422
20140630-144422.csv
20140707-182653
20140707-182653.csv
20140710-183153... (7 Replies)
Discussion started by: Praveen Pandit
7 Replies
8. Shell Programming and Scripting
I am developing one script which will take log file name, output file name, date, hour and minute as an argument and based on these inputs, the script will scan and capture all the error(s) that have been triggered from a given time. Example: script should capture all the error after 13:50 on Jan... (2 Replies)
Discussion started by: ROMA3
2 Replies
9. Shell Programming and Scripting
find /app/data -name "Availability" -
Below is the output now i need to filter based on latest modified timestamp.
I know 3 is the latest modified time stamp but i tried different options but only filtering docs and not on headnote..Can any one tell me how to do that..
... (2 Replies)
Discussion started by: vkiyv05
2 Replies
10. Shell Programming and Scripting
I have a file hello.txt which was created today (today's date timestamp)
I wish to change its date timestamp (access, modified, created) to 1 week old i.e one week from now.
uname -a
SunOS mymac 5.11 11.2 sun4v sparc sun4v
Can you please suggest a easy way to do that ? (12 Replies)
Discussion started by: mohtashims
12 Replies
rmdir(1) General Commands Manual rmdir(1)
NAME
rmdir - Removes a directory
SYNOPSIS
rmdir [-p] [-s] directory...
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
rmdir: XCU5.0
Refer to the standards(5) reference page for more information about industry standards and associated tags.
OPTIONS
Removes all directories in a path name. For each directory argument, the directory entry it names is removed.
If the directory argument includes more than one path name component, effects equivalent to the following command occur: rmdir -p
$(dirname directory)
That is, rmdir recursively removes each directory in the path name.
OPERANDS
The path name of an empty directory to be removed.
DESCRIPTION
The rmdir command removes a directory from the system. The directory must be empty before you can remove it, and you must have write per-
mission in its parent directory. Use the ls -al command to see if a directory is empty.
If a directory and a subdirectory of that directory are specified in a single invocation of rmdir, the subdirectory must be specified
before the parent directory so that the parent directory will be empty when rmdir tries to remove it.
RESTRICTIONS
A directory must be empty before you can remove it, and you must have write permission in its parent directory. If the -p option is used,
all directories in the path must be empty except for the directory being recursively removed.
EXIT STATUS
The following exit values are returned: Each directory specified by directory operand was successfully removed. An error occurred.
EXAMPLES
To empty and remove a directory, enter: rm mydir/* mydir/.* rmdir mydir
This removes the contents of mydir, then removes the empty directory. The rm command displays an error message about trying to
remove the directories . (dot) and .. (dot dot), and then rmdir removes them.
Note that rm mydir/* mydir/.* first removes files with names that do not begin with a (dot), then those with names that do begin
with a (dot). You may not realize that the directory contains file names that begin with a (dot) because the ls command does not
normally list them unless you use the -a option to see the files whose names begin with a (dot). To remove all of the directories
in the path name a/b/c, enter: rmdir -p a/b/c
Use a command like this one if directory a in the current directory is empty except that it contains a directory b and a/b is empty
except that it contains a directory c.
ENVIRONMENT VARIABLES
The following environment variables affect the execution of rmdir: Provides a default value for the internationalization variables that are
unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization vari-
ables contain an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string value,
overrides the values of all the other internationalization variables. Determines the locale for the interpretation of sequences of bytes
of text data as characters (for example, single-byte as opposed to multibyte characters in arguments). Determines the locale for the for-
mat and contents of diagnostic messages written to standard error. Determines the location of message catalogues for the processing of
LC_MESSAGES.
SEE ALSO
Commands: mkdir(1), ls(1), rm(1)
Functions: rmdir(2), unlink(2), remove(3)
Standards: standards(5)
rmdir(1)