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)
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)
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)
Hi all,
I need a script to delete a large set of files from a directory under / based on an input file and want to redirect errors into separate file.
I have already prepared a list of files in the input file.
Kndly help me.
Thanks,
Prash (36 Replies)
To delete log files content older than 30 days and append the lastest date log file date in the respective logs
I want to write a shell script that deletes all log files content older than 30 days and append the lastest log file date in the respective logs
This is my script
cd... (2 Replies)
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)
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)
Hello Everyone,
I want to delete the image files from a directory, which are not listed in a TEXT file.
The directory contains large number of image files (in millions) required / not required. I want to delete the image files which are "not required".
I have generated a Text file having... (3 Replies)
amigos
necesito dejar en un directorio solo los archivos del dia anterio, como puedo hacer eso con una shell
Hello.
Per our forum rules, all posts must be in English.
We do provide translation services for posts from English to a number of languages as a benefit to users. However,... (16 Replies)
Discussion started by: tricampeon81
16 Replies
LEARN ABOUT REDHAT
unix2dos
unix2dos(1) General Commands Manual unix2dos(1)NAME
unix2dos - UNIX to DOS text file format converter
SYNOPSYS
unix2dos [options] [-c convmode] [-o file ...] [-n infile outfile ...]
Options:
[-hkqV] [--help] [--keepdate] [--quiet] [--version]
DESCRIPTION
This manual page documents unix2dos, the program that converts text files in UNIX format to DOS format.
OPTIONS
The following options are available:
-h --help
Print online help.
-k --keepdate
Keep the date stamp of output file same as input file.
-q --quiet
Quiet mode. Suppress all warning and messages.
-V --version
Prints version information.
-c --convmode convmode
Sets conversion mode. Simulates unix2dos under SunOS.
-o --oldfile file ...
Old file mode. Convert the file and write output to it. The program default to run in this mode. Wildcard names may be used.
-n --newfile infile outfile ...
New file mode. Convert the infile and write output to outfile. File names must be given in pairs and wildcard names should NOT be
used or you WILL lost your files.
EXAMPLES
Get input from stdin and write output to stdout.
unix2dos
Convert and replace a.txt. Convert and replace b.txt.
unix2dos a.txt b.txt
unix2dos -o a.txt b.txt
Convert and replace a.txt in ASCII conversion mode. Convert and replace b.txt in ISO conversion mode.
unix2dos a.txt -c iso b.txt
unix2dos -c ascii a.txt -c iso b.txt
Convert and replace a.txt while keeping original date stamp.
unix2dos -k a.txt
unix2dos -k -o a.txt
Convert a.txt and write to e.txt.
unix2dos -n a.txt e.txt
Convert a.txt and write to e.txt, keep date stamp of e.txt same as a.txt.
unix2dos -k -n a.txt e.txt
Convert and replace a.txt. Convert b.txt and write to e.txt.
unix2dos a.txt -n b.txt e.txt
unix2dos -o a.txt -n b.txt e.txt
Convert c.txt and write to e.txt. Convert and replace a.txt. Convert and replace b.txt. Convert d.txt and write to f.txt.
unix2dos -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt
DIAGNOSTICS BUGS
The program does not work properly under MSDOS in stdio processing mode. If you know why is that so, please tell me.
AUTHOR
Benjamin Lin - ( blin@socs.uts.edu.au )
MISCELLANY
Tested environment:
Linux 1.2.0 with GNU C 2.5.8
SunOS 4.1.3 with GNU C 2.6.3
MS-DOS 6.20 with Borland C++ 4.02
Suggestions and bug reports are welcome.
SEE ALSO dos2unix(1)1995.03.31 unix2dos v2.2 unix2dos(1)