11-02-2016
I'm not quite sure I understand either of the posts #1 or #3, but if you say that the find command mentioned doesn't return anything, this is not surprising:
- -type d returns only directory names: none of your files is a directory.
- -mtime +14 returns names older than 14 days (in fact 14 * 24 hours): none of your files is that old; the oldest (24. Oct) is nine days old as of today (2. Nov).
This User Gave Thanks to RudiC For This Post:
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'd like to delete ALL files on a daily basis within a directory that are over a day old. Anyone know how I can automate this through Cron as I have 146 websites to administer.
I've tried...
30 02 * * * /home/myspace/tmp/webalizer -atime + 1\! -type d -exec rm -f {} \;
but all i get is an... (1 Reply)
Discussion started by: southoxon
1 Replies
2. Shell Programming and Scripting
Hi Team,
I am new to scripting. I want to create a script, which needs to keep only 5 days directories and want to remove the old directory from a particular directory. Can Somebody help me with starting this script.
All my directories will be created in the name <YYYYMMDD>.
Thanks... (2 Replies)
Discussion started by: siva80_cit
2 Replies
3. UNIX for Dummies Questions & Answers
I have a subdirectory which has many child directories and files in it. How can i delete them through a list (txt, rtf. xls , or any file extension) which is created by me. I can not manual delete one by one because it almost over 300 directory and over 4000 files. Any one know please help me? (5 Replies)
Discussion started by: cthinh
5 Replies
4. Shell Programming and Scripting
what`s the script to do that? assuming my text file is "test.txt" (10 Replies)
Discussion started by: finalight
10 Replies
5. Shell Programming and Scripting
Hello,
I have several files in a specific directory.
A specific string in one file can occur in another files.
If this string is in other files. Then all the files in which this string occured should be deleted and only 1 file should remain with the string.
Example.
file1
ShortName "Blue... (2 Replies)
Discussion started by: premier_de
2 Replies
6. Shell Programming and Scripting
Hi Guys,
I need help on deleting particular date files in a directory. I have to delete thousands of files with respect to particular date. Could anyone help on this to delete particular date files at a time?
Thanks in Advance (2 Replies)
Discussion started by: teddy2882
2 Replies
7. Shell Programming and Scripting
Hello All
I am implementing my task in Perl and i found an issue.
What i want to do is to remove files from the directory which were made 20 days back using Perl script (9 Replies)
Discussion started by: parthmittal2007
9 Replies
8. UNIX for Dummies Questions & Answers
hello
i am trying to delete some files and also some directories. However, despite having the required permissions (i m the owner), Permission is being denied. I also tried to delete using find and inode number, but again Permission was denied.
:wall:
I am new to unix so please dumb down... (8 Replies)
Discussion started by: curiosity
8 Replies
9. Shell Programming and Scripting
he following are the files available in my directory
RSK_123_20141113_031500.txt
RSK_123_20141113_081500.txt
RSK_126_20141113_041500.txt
RSK_126_20141113_081800.txt
RSK_128_20141113_091600.txt
Here, "RSK" is file prefix and 123 is a code name and rest is just timestamp of the file when its... (7 Replies)
Discussion started by: kridhick
7 Replies
10. Shell Programming and Scripting
Hi
My directory structure is as below.
dir1, dir2, dir3
I have the list of files to be deleted in the below path as below.
/staging/retain_for_2years/Cleanup/log $ ls -lrt
total 0
drwxr-xr-x 2 nobody nobody 256 Mar 01 16:15 01-MAR-2015_SPDBS2
drwxr-xr-x 2 root ... (2 Replies)
Discussion started by: prasadn
2 Replies
CHSH(1) User Commands CHSH(1)
NAME
chsh - change login shell
SYNOPSIS
chsh [options] [LOGIN]
DESCRIPTION
The chsh command changes the user login shell. This determines the name of the user's initial login command. A normal user may only change
the login shell for her own account; the superuser may change the login shell for any account.
OPTIONS
The options which apply to the chsh command are:
-h, --help
Display help message and exit.
-R, --root CHROOT_DIR
Apply changes in the CHROOT_DIR directory and use the configuration files from the CHROOT_DIR directory.
-s, --shell SHELL
The name of the user's new login shell. Setting this field to blank causes the system to select the default login shell.
If the -s option is not selected, chsh operates in an interactive fashion, prompting the user with the current login shell. Enter the new
value to change the shell, or leave the line blank to use the current one. The current shell is displayed between a pair of [ ] marks.
NOTE
The only restriction placed on the login shell is that the command name must be listed in /etc/shells, unless the invoker is the superuser,
and then any value may be added. An account with a restricted login shell may not change her login shell. For this reason, placing /bin/rsh
in /etc/shells is discouraged since accidentally changing to a restricted shell would prevent the user from ever changing her login shell
back to its original value.
FILES
/etc/passwd
User account information.
/etc/shells
List of valid login shells.
/etc/login.defs
Shadow password suite configuration.
SEE ALSO
chfn(1), login.defs(5), passwd(5).
shadow-utils 4.1.5.1 05/25/2012 CHSH(1)