Sponsored Content
Top Forums Shell Programming and Scripting Delete files except the file names available in the Except File Post 302968598 by jgt on Friday 11th of March 2016 12:04:33 PM
Old 03-11-2016
Code:
while read f
do
rm $f
done <Except.txt

will delete all the files listed in except.txt

Don,
You should have deleted the post. I was using my phone and could not see all of the question at once, cause I'm old and need big print, and got the question backwards.

Last edited by jgt; 03-12-2016 at 09:53 AM.. Reason: Fix CODE tags.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How can I delete files using a file that containt path and names?

Recentily i receive virus ninda and my network was files *.eml. I find all *.eml with: find / -name *.eml -print > virus Virus has the path and name of the file,so, How can i delete all *.eml? Thanks (2 Replies)
Discussion started by: AlvaroD
2 Replies

2. UNIX for Dummies Questions & Answers

how to delete file names with $ in them

I'm reading the file name from a spreadsheet then creating a data file with several remove statements. i.e cd /sun/5.0/AWBE/v1.0/svr/VaultLocs/CPVaultLoc/ rm "ZXCV KTest Stat host $$ cont.xls" cd /sun/5.0/AQE/v1.0/svr/VaultLocs/CPVaultLoc/ rm "ABC PMT OzLtr.pdf" cd... (2 Replies)
Discussion started by: orahi001
2 Replies

3. Shell Programming and Scripting

Insert file names when concatenate files into a file

Hi I found the following line would concatenate all test_01 test_02 test_03 files into "bigfile". cat test_* >> bigfile But, what I'm looking for a way to insert each file names in order when concatenated in "bigfile". Thank you samky2005 (2 Replies)
Discussion started by: samky2005
2 Replies

4. Shell Programming and Scripting

Searching for file names in a directory while ignoring certain file names

Sun Solaris Unix Question Haven't been able to find any solution for this situation. Let's just say the file names listed below exist in a directory. I want the find command to find all files in this directory but at the same time I want to eliminate certain file names or files with certain... (2 Replies)
Discussion started by: 2reperry
2 Replies

5. Shell Programming and Scripting

How to split a data file into separate files with the file names depending upon a column's value?

Hi, I have a data file xyz.dat similar to the one given below, 2345|98|809||x|969|0 2345|98|809||y|0|537 2345|97|809||x|544|0 2345|97|809||y|0|651 9685|98|809||x|321|0 9685|98|809||y|0|357 9685|98|709||x|687|0 9685|98|709||y|0|234 2315|98|809||x|564|0 2315|98|809||y|0|537... (2 Replies)
Discussion started by: nithins007
2 Replies

6. UNIX for Dummies Questions & Answers

To delete the oldest files in a file when file count in the folder exceeds 7

Hi All, I need to delete the oldest file in folder when the file count in the folder exceed 6 ( i have a process that puts the source files into this folder ) E.x : Folder : /data/opt/backup 01/01/2012 a.txt 01/02/2012 b.txt ... (1 Reply)
Discussion started by: akshay01987
1 Replies

7. UNIX for Dummies Questions & Answers

Delete files whose file names are listed in a .txt file

hi, I need a help. I used this command to list all the log files which are for more than 10 days to a text file. find /usr/script_test -type f -mtime +10>>/usr/ftprm.txt I want all these files listed in the ftprm.txt to be ftp in another machine and then rm the files. Anyone can help me... (8 Replies)
Discussion started by: kamaldev
8 Replies

8. Shell Programming and Scripting

Exclude certain file names while selectingData files coming in different names in a file name called

Data files coming in different names in a file name called process.txt. 1. shipments_yyyymmdd.gz 2 Order_yyyymmdd.gz 3. Invoice_yyyymmdd.gz 4. globalorder_yyyymmdd.gz The process needs to discard all the below files and only process two of the 4 file names available ... (1 Reply)
Discussion started by: dsravanam
1 Replies

9. Shell Programming and Scripting

While loop a file containing list of file names until the files are found?

Hi, I have a control file which will contain all filenames(300) files. Loop through all the file names in the control files and check the existence of this file in another directory(same server). I need to infinitely(2 hrs) run this while loop until all the files are found. Once a file is found,... (5 Replies)
Discussion started by: laknar
5 Replies

10. Shell Programming and Scripting

Compare Only "File Names" in 2 Files with file lists having different directory structure

I have a tar arcive arch_all.tar.gz and 4 batched tar archive . These batches are supposed to have all the files form arch1.all.tar.gz arch1_batch1.tar.gz arch1_batch2.tar.gz arch1_batch3.tar.gz arch1_batch4.tar.gz my issue is that the directory structure in "arch_all.tar.gz" is... (6 Replies)
Discussion started by: sumang24
6 Replies
Ns_Info(3aolserver)					   AOLserver Library Procedures 				       Ns_Info(3aolserver)

__________________________________________________________________________________________________________________________________________________

NAME
Ns_InfoAddress, Ns_InfoBootTime, Ns_InfoBuildDate, Ns_InfoConfigFile, Ns_InfoErrorLog, Ns_InfoHomePath, Ns_InfoHostname, Ns_InfoLabel, Ns_InfoNameOfExecutable, Ns_InfoPid, Ns_InfoPlatform, Ns_InfoServerName, Ns_InfoServerVersion, Ns_InfoServersStarted, Ns_InfoShutdownPend- ing, Ns_InfoStarted, Ns_InfoTag, Ns_InfoUptime, Ns_PageRoot - Get server information SYNOPSIS
#include "ns.h" char * Ns_InfoAddress(void) int Ns_InfoBootTime(void) char * Ns_InfoBuildDate(void) char * Ns_InfoConfigFile(void) char * Ns_InfoErrorLog(void) char * Ns_InfoHomePath(void) char * Ns_InfoHostname(void) char * Ns_InfoLabel(void) char * Ns_InfoNameOfExecutable(void) int Ns_InfoPid(void) char * Ns_InfoPlatform(void) char * Ns_InfoServerName(void) char * Ns_InfoServerVersion(void) int Ns_InfoServersStarted(void) int Ns_InfoShutdownPending(void) int Ns_InfoStarted(void) char * Ns_InfoTag(void) int Ns_InfoUptime(void) char * Ns_PageRoot(char *server) _________________________________________________________________ DESCRIPTION
These functions return information about the server. Many of the functions return pointers to strings or other types of information which, in most cases, you must not free. These are denoted as "read-only" in the sections below. Ns_InfoAddress() Return the server IP address of the server. The IP address is defined in the server configuration file. The IP address is returned as a string pointer which you must treat as read-only. If you want to alter the string, you must use ns_strdup to copy the string to another location in memory and modify that instead. Ns_InfoBootTime() Return the time that the server was started as an int. Treat the result as time_t. Ns_InfoBuildDate() Return the date and time that this server was compiled as a string pointer. Treat the result as read-only. Ns_InfoConfigFile() Return the absolute path name of the configuration file in use as a string pointer. Treat the result as read-only. Ns_InfoErrorLog() Return the name of the error log as a string pointer. Treat the result as read-only. The name may be just a name, a relative path or an absolute path depending on how it is defined in the server configuration file. Ns_InfoHomePath() Return the absolute directory path where AOLserver is installed as a string pointer. Treat the result as read-only. Ns_InfoHostname() Return the hostname of the host that AOLserver is running on as a string pointer. The gethostname(2) function is used. If gethost- name(2) fails to return a hostname, "localhost" is used instead. Treat the result as read-only. Ns_InfoLabel() Return the source code label for AOLserver as a string pointer. Statically defined in the source code. If no label was used, "unla- beled" is returned. You can use these functions to provide the source code label when you report problems with the server. Treat the result as read-only. Ns_InfoNameOfExecutable() Return the name of the running executable as a string pointer. Treat the result as read-only. Ns_InfoPid() Return the pid of the running AOLserver executable as an int. Ns_InfoPlatform() Return the platform name as a string pointer, e.g. "linux". Treat the result as read-only. Ns_InfoServerName() Return the AOLserver name string, e.g. "AOLserver". Statically defined in the source code. Treat the result as read-only. Ns_InfoServerVersion() Return the AOLserver version string, e.g. "3.5.2". Statically defined in the source code. Treat the result as read-only. Ns_InfoServersStarted() Return TRUE if the server has started, i.e., if initialization and module loading is complete. This is a compatibility function that calls Ns_InfoStarted. Ns_InfoShutdownPending() Return TRUE if there is there a shutdown pending, i.e. if an INTR signal has been received or if ns_shutdown has been called. Ns_InfoStarted() Return TRUE if the server has started, i.e., if initialization and module loading is complete. Ns_InfoTag() Return the CVS tag of this build of AOLserver. Statically defined in the source code. The value may be meaningless. Treat the result as read-only. Ns_InfoUptime() Return how long, in seconds, AOLserver has been running. Ns_PageRoot(server) Return the path name of the AOLserver pages directory for a particular server as a string pointer. The server argument is not used. Treat the result as read-only. SEE ALSO
nsd(1), info(n) KEYWORDS
AOLserver 4.0 Ns_Info(3aolserver)
All times are GMT -4. The time now is 02:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy