Unless you have a list of files (as assumed in the code RavinderSingh13 suggested), you could try something like:
where /dir1 ... /dirN are pathnames to the roots of the file hierarchies you want to process and trigger_path is the pathname of a file (not located in any of the file hierarchies you want to process) that has a timestamp indicating the oldest file you want to keep. (You can create such a file using the touch command using a -t option to specify the boundary date and time.) If the pathnames printed by this looks right, take out the echo to actually remove the files.
Note that if you use this with any file hierarchies containing files that are part of your system's initial installation, this can turn your system into a doorstop that will no longer run and won't boot. Don't try this if you don't know what you're doing. There is a huge difference between very old and not needed!
Hello. I have the following issue: my txt file has the following format:
train/dr4/fklc0/sx175.txt
0 80282 Severe myopia contributed to Ron's inferiority complex.
train/dr4/fklc0/sx355.txt
0 42906 Dolphins are intelligent marine mammals. train/dr4/fklc0/sa2.txt
awk 'NR%2==0' test1.txt >... (4 Replies)
There are some files in a directory like a.tx~ , b.txt~,c.txt~.
I want to delete all these files inside that directory and sub directory.
How can i do this?
#!/bin/bash
cd thatdirectory
......
rm -rf *~
...... (7 Replies)
i have a txt file of image names that have to be deleted in pwd how can i use the txt file to delete the files in pwd and is it possible?--i might be able to import the txt files into a spreadsheet ahd same it as a csv file. i want it to be done recursive lly --what i mean is teh sysem goes thru... (4 Replies)
Hi,
I`m a total newbie, well my requirement is that i have 2 files
I want to identify which countries i do not currently have in db..
how can i use the grep or another command to find this file ..
i want to match all-countries.txt with countries-in-db.txt so the output is equal to... (11 Replies)
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)
Hi all,
I desperately need a small script which deletes everything in a particular .txt file when "Abs = {" appears till "},", and also when "B-1 = {" appears till "},"
I would like all the text in between of those instances to be deleted, however, other text to be unedited (kept as it is).... (12 Replies)
I have created few text file during run time by redirecting the txt file
echo USER_LIST_"$(date '+%d%h%Y')".csv > report_location.txt
report_location.txt is creating in the same location where I run script
home/script
When I try to remove the txt file at the end of the... (3 Replies)
Friends,
I am in need to delete files from a directory on a regular basis. I want to place all the files to be deleted in delete .txt file and require a script to delete files, line by line from this delete.txt file. Please help me with this script as am new to unix scripting. (3 Replies)
Discussion started by: fop4658
3 Replies
LEARN ABOUT DEBIAN
cloudservers
CLOUDSERVERS(1) User Commands CLOUDSERVERS(1)NAME
cloudservers - Command-line interface to the Cloud Servers API.
SYNOPSIS
cloudservers [ --username USERNAME ] [ --apikey APIKEY ] <subcommand>
DESCRIPTION
cloudservers is a command line interface to the Rackspace Cloud Servers API.
COMMAND OVERVIEW
cloudservers backup-schedule
Show or edit the backup schedule for a server.
cloudservers backup-schedule-delete
Delete the backup schedule for a server.
cloudservers boot
Boot a new server.
cloudservers delete
Immediately shut down and delete a server.
cloudservers flavor-list
Print a list of available 'flavors' (sizes of servers).
cloudservers help
Display help about this program or one of its subcommands.
cloudservers image-create
Create a new image by taking a snapshot of a running server.
cloudservers image-delete
Delete an image.
cloudservers image-list
Print a list of available images to boot from.
cloudservers ip-share
Share an IP address from the given IP group onto a server.
cloudservers ip-unshare
Stop sharing an given address with a server.
cloudservers ipgroup-create
Create a new IP group.
cloudservers ipgroup-delete
Delete an IP group.
cloudservers ipgroup-list
Show IP groups.
cloudservers ipgroup-show
Show details about a particular IP group.
cloudservers list
List active servers.
cloudservers reboot
Reboot a server.
cloudservers rebuild
Shutdown, re-image, and re-boot a server.
cloudservers rename
Rename a server.
cloudservers resize
Resize a server.
cloudservers resize-confirm
Confirm a previous resize.
cloudservers resize-revert
Revert a previous resize (and return to the previous VM).
cloudservers root-password
Change the root password for a server.
cloudservers show
Show details about the given server.
Optional arguments:
--username USERNAME
Defaults to env[CLOUD_SERVERS_USERNAME].
--apikey APIKEY
Defaults to env[CLOUD_SERVERS_API_KEY].
See "cloudservers help COMMAND" for help on a specific command.
cloudservers March 2010 CLOUDSERVERS(1)