This is a two step approach, but it should do what you request:
1) create an "exclude file" containing all entries that are NOT directories (hoping your grep installation can use EREs).
2) untar the tarball excluding above; this will create the directories with owner info and permissions:
You may need to anchor the result according to your needs.
Hi folks,
When I am extracting an archive using the:
tar -xvf /dev/rmt0 command i get the following error:
x ./GRBD8901/GRBR006T, 1763253368 bytes, 3443855 media blocks.
tar: 0511-197 ./GRBD8901/GRBR006T: Cannot write data extracted with the tar command: ... (7 Replies)
Hey guys complete n00b here so I'll try my best at explaining.
I'm creating a backup and restore utility and decided to use tar. I create a backup folder in each user's account and when backing up (say word processing files), I use the following:
tar cvf /home/user/backup/wpbackup.tar... (2 Replies)
hi,
I am in a weird situation. I have a parent tarball which contains 2 sub tarballs.
The structure is such :
Parent.tar.gz ---- > child1.tar.gz and child2.tar.gz
I need to get the size of the parent tarball without untaring it
I know that the command is gunzip -c parent.tar.gz | wc -c ... (1 Reply)
Hi,
I'm using a tar command
tar -xOvf /home/mytar.tar
My intention is to extract data in files which are inside various directories,
without extracting files to the disk.
Is this the best way to achieve it?
Thanks,
Chetan (3 Replies)
Hi,
I have tar filw which has multiple directories which contain files.
When i extract using tar -xf the directory structure also get extracted.
I require only files and not directory structures as there will be overhead of moving the files again.
So i searched here and got a solution but... (4 Replies)
#cat a
BAC064DAL
BAC063DAL
BAC056PHX
BAC066DAL
BAC062PHX
BAC062DAL
BAC060DAL
BAC058PHX
BAC054PHX
BAC051PHX
# for i in `cat a`
> do
> tar xvf $a/$a*.tar*
> done
tar: /*.tar*: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: /*.tar*: Cannot... (3 Replies)
Hi,
uname -a
SunOS mymac 5.11 11.2 sun4u sparc SUNW,SPARC-Enterprise
I need to tar a folder /tmp/moht but do not want these three folders to be included in the tar file -> savejpg, bmpsave and imgsave
I tried --exclude, -path, -not options but it says bad option
Can you help me with... (3 Replies)
I have a tar file hello.tar which is 95 GB.
hello.tar has many files and folders including some tar files as well.
I wish to create a new tar ball which should maintain only the folder structure of hello.tar and the tar ball within the hello.tar
So basically the idea is to untar... (2 Replies)
Hi all. I'm hitting a problem creating a tar archive in one directory from files located in a different directory. It fails when I replace the absolute paths with variables in the script but works if I just run tar on the cmdln. E.g.
#!/bin/ksh
BASE=$PWD
STAGE=$BASE/stage
LOG=$BASE/log... (4 Replies)
Hi Team,
Following unix command is throwing error. Can anyone please help me to fix the issue?
tar -cvf /aa/bb/cc/tarball1.tar /x/y/z1/abc.ksh /x/y/z2/pqr.txt /x/y/z3/lmn.tmp
Error message thrown:
tar: Removing leading `/' from member names
OS: uname -a
Linux xyz... (1 Reply)
Discussion started by: kmanivan82
1 Replies
LEARN ABOUT DEBIAN
sdlx::controller::interface
pods::SDLx::Controller::Interface(3pm) User Contributed Perl Documentation pods::SDLx::Controller::Interface(3pm)NAME
SDLx::Controller::Interface - Interface Physics and Rendering with the Controller with callbacks
CATEGORY
Extension, Controller
SYNOPSIS
use SDL;
use SDLx::App;
use SDLx::Controller::Interface;
#SDLx::App is a controller
my $app = SDLx::App->new(width => 200, height => 200 );
my $ball = SDLx::Controller::Interface->new( x=> 10, y => 50, v_x => 10, v_y=> 20 );
#Set the initial state of the ball's physics, this is optional
$ball->set_acceleration(
sub {
my ($time, $current_state) = @_;
return( 0, -10, 0 ); # Return accelerations (x,y,rotation)
}
);
my $ball_render = sub {
my $state = shift;
$app->draw_rect( undef, 0 );
$app->draw_rect( [$state->x, $state->y, 10,10], [255,0,0,255] );
$app->update();
};
$ball->attach( $app, $ball_render, @params );
$app->run();
$ball->detach(); #can be called at anytime (for example when ball 'dies')
DESCRIPTION METHODS
set_acceleration
Allows you to set the acceleration callback for defining the interface's behaviour in terms of x,y and rotation.
$interface->set_acceleration (
sub {
my ($time, $current_state) = @_;
return ( $accel_x, $accel_y, $torque );
}
);
These accelerations are arbitrary and can be set to any frame of reference. Your render callback will handle how to interpret it.
The callback will receive the time and the current state as a "SDLx::Controller::State" element.
attach
Attaches the interface to a controller with a render callback
$interface->attach( $controller, $render, @params );
Where $render is a callback that receives the interpolated "SDLx::Controller::State".
my $render = sub {
my ($state, @params) = @_;
# draw the current $state.
};
The @params are any extra parameters you would like to pass to the $render callback.
current
my $current_state = $interface->current();
Returns the current state of the interface as a "SDLx::Controller::State".
previous
my $previous_state = $interface->previous();
Returns the previous state of the interface as a "SDLx::Controller::State".
detach
$interface->detach();
If $interface has been "attach()"'ed to any controller it will be detached now.
OTHER METHODS
Don't use these unless you really really want to.
acceleration
Call the acceleration callback once.
interpolate
Interpolate the current state
evaluate
Evaluate the new current and previous state.
update
Update the states by integrating with time.
AUTHORS
See "AUTHORS" in SDL.
perl v5.14.2 2012-05-28 pods::SDLx::Controller::Interface(3pm)