11-14-2010
nevermind I got it working with some tweaking
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I want to write a script that deletes all folders and keep the last 10 recent folders.
I know the following:
ls -ltr will sort the folders from old to recent.
ls -ltr | awk '{print $9}' will list the folder names (with a blank line at the beginning)
I want to get the 10th folder from... (3 Replies)
Discussion started by: melanie_pfefer
3 Replies
2. Shell Programming and Scripting
find /basedirectory -type f -mtime +3 >> /tmp/tempfile
find /basedirectory -type d -mtime +3 >> /tmp/tempfile
mailx -s "List of removed files and folders" myemail@domain.com < /tmp/te
mpfile
rm /tmp/tempfile
find /basedirectory -type f -mtime +3 -exec rm {} \;
find /basedirectory -type d... (7 Replies)
Discussion started by: melanie_pfefer
7 Replies
3. Shell Programming and Scripting
I do not know much about shell scripting so I am at a loss here. If someone can help me, that would be great!
I have two directories
/dir1
/dir2
I need to delete all files from /dir1 and that does not have a correspondent file in /dir2. It should NOT check file suffixes in /dir2 . Why?... (20 Replies)
Discussion started by: kaah
20 Replies
4. UNIX for Dummies Questions & Answers
I need to delete a folder and files in it of yesterdays and simply put this in cron.
Folder name - "2010-03-2010"
File name - "eprod_06_23.dmp" and "eprod_06_23.exp"
Actually this folder and file is been created by a script which takes a backup of DB everyday.Thats why it creates folder and file... (3 Replies)
Discussion started by: j_panky
3 Replies
5. Shell Programming and Scripting
Folks,
I am hopeful that you may be able to help me out with writing a script that can be run nightly (as cron?) to loop through all subfolders within the "/media" directory, delete all of the files in each of them, and then copy in all of the files from the "/home//sansa" directory to each of... (6 Replies)
Discussion started by: acraig
6 Replies
6. UNIX for Dummies Questions & Answers
I have a requirement to delete the files and folders under a given directory.
my directory structure is like this..
Data
|
A(Directory)
|_PDF(Directory)----pdf files
|_XML()Directory --xml files
|--files
|
B(Directory)
|_PDF(Directory)----pdf files
|_XML()Directory --xml files ... (1 Reply)
Discussion started by: ramse8pc
1 Replies
7. Shell Programming and Scripting
Hi Everyone,
I work for GE Money IVR as a DB analyst and the environment on which I work is Solaris 5.0 server and Oracle 11g.
I got a project in which I have to clean up the folders and files which are not used in DB.
I copied an existing script and edited it, dont know this is the... (5 Replies)
Discussion started by: habeeb506
5 Replies
8. UNIX for Advanced & Expert Users
Hi
I am new to Linux / scripting language. I need to improve our Linux servers at work and looking to claim some space my deleting log files/ folders on a 5 day basis.
Can someone help me with creating a script to do so.
Any sample script will be helpful.:b:
Regards (2 Replies)
Discussion started by: sachinksl
2 Replies
9. Shell Programming and Scripting
hi,
i have a requirement to delete all the files from all the directories except some specific directories like archive and log.
for example:
there are following directories such as
A B C D Archive E Log F
which contains some sub directories and files. The requirement is to delete all the... (7 Replies)
Discussion started by: Little
7 Replies
10. Shell Programming and Scripting
Hello, my first thread here.
I've been searching and fiddling around for about a week and I cannot find a solution.:confused:
I have been converting all of my home videos to HEVC and sometimes the files end up smaller and sometimes they don't. I am currently comparing all the video files... (5 Replies)
Discussion started by: Josh52180
5 Replies
LEARN ABOUT DEBIAN
qemuctl
qemuctl(1) qemuctl(1)
NAME
qemuctl - Graphical control for qemu
SYNTAX
qemuctl [-suspend-dir <dir>] [-suspend-file <filename>] [-qemu <qemu>] [-nowakeup] qemu-options
DESCRIPTION
qemuctl is a gui that controls a qemu process with the built-in monitor of qemu. So you can change devices, suspend machines, save screen-
shots, ...
If you suspend a machine it will do the following macro:
stop
screendump "suspend-dir/suspend-file.ppm"
savevm "suspend-dir/suspend-file.vm"
commit
quit
You can afterwards resume the machine with:
qemuctl -suspend-dir suspend-dir -suspend-file suspend-file your_qemu_options
the suspend-files will then be deleted
or
qemuctl -loadvm suspend-dir/suspend-file.vm your_qemu_options
Be aware that you can't use the "-monitor" option with qemuctl, because it needs the control over the monitor. The option "-serial stdio"
can't be used, too.
OPTIONS
-suspend-file <filename>
This option is normaly used by qemuctl to support suspend and wakeup. qemuctl can then find the vm-state-file in its folders and
wakeup the virtual machine. If the file is there the qemuctl waes up the virtual machine and deletes the file afterwards. On suspend
the vm-state-file is then stored as the <filename> with the .vm ending and the screenshot is stored as the <filename> with the .ppm
ending.
Default filename is "suspend".
-suspend-dir <dir>
This is the dir where the suspend files would be stored or expected.
Default is current dir.
-nowakeup
Don't wake up even if the vm-file is there. Suspend still works.
Default is to wake up using the vm-file if it is there.
-qemu <qemu>
The qemu variation to use. It can be qemu or kvm.
Default is qemu.
qemu-options
Use qemu-options for the launch of qemu. See qemu(1) for further details.
FILES
none
ENVIRONMENT VARIABLES
none
EXAMPLES
To use the suspend file 'Debian 3.1' and store/search it in the '/qemu' dir:
qemuctl -suspend-file "Debian 3.1" -suspend-dir "/qemu" -boot c -hda hda.raw
Alternativly you can run it with default suspend filenames:
qemuctl -boot c -hda hda.raw
AUTHORS
Peter Rustler
SEE ALSO
qemu(1) qemu-launcher(1)
Peter Rustler 0.0.1 qemuctl(1)