All attempts are failing upon encountering whitespace.
1.
Code:
ls -ltr `cat testFile.txt | xargs -0`
ls: "/home/guest/file: No such file or directory
ls: a": No such file or directory
ls: "/home/guest/file: No such file or directory
ls: b": No such file or directory
ls: "/home/guest/file: No such file or directory
ls: c": No such file or directory
ls: "/home/guest/fileF": No such file or directory
ls: "/home/guest/fileE": No such file or directory
ls: "/home/guest/fileD": No such file or directory
2. Same error from
Code:
ls -ltr `awk '{print}' /home/guest/testFile.txt
3. Same error from
Code:
cat testFile.txt | while read i ; do ls -ltr $i ; done
Any assistance would be greatly appreciated. Thanks!
I have a problem with the script below
#!/bin/sh
for vo in `find -maxdepth 1 -type f -regex "^\./*$"`
do
ls -l "$vo"
some other commands
done
It works fine until `find ...` returns files with spaces. I've tryed to change IFS but haven't succeed
Any solutions? (4 Replies)
Hi,
THe following is the output when i run the command ls -ltr
can anyone explain the meaning of the field in red
-rw-r----- 3 orca orca 20924 Sep 08 19:21 BTL027SASI.gnt
-rw-r----- 3 orca orca 20924 Sep 08 19:21 BTL027RITD.gnt
-rw-r----- 3 orca orca ... (2 Replies)
I posted a week ago regarding this scripting question, but I need to revisit and have a few more questions answered..
User cfajohnson was extremely helpful with the archive script, but clarification on my part is needed to help steer the answer in a direction that works in this particular... (5 Replies)
Hi All,
I see similar problems in past threads but so far no answers have worked for me. I am trying to write a script which parses a txt file that contains one filename per line, then finds those files on the local disk and copies them to a specified directory.
What I have:
... (4 Replies)
Hi,
I want to list all the files matching in a directory directory given below
Here one of the folder has a space in the path.
/MAS02/RMS/WBDev/Krishna/Krishna Mohan/FMSplitByKeyAfterChanges1000075383.fileman.*.txt.out.1000075383.0
The following works from command line... (1 Reply)
I have a large list of filenames from an Excel sheet, which I then translate into a simple text file. I'd like to use this list, which contains various file extensions , to archive these files and then remove them recursively through multiple directories and subdirectories. So far, it looks like... (5 Replies)
Hi,
I wanted to add specific text to each row in a text file containing three rows. Example:
0 8 7 6 5 5
7 8 9 0 7 9
7 8 9 0 1 2
And I want to add a 21 at the beginning of the first row, and blank spaces at the beginning of the second two rows. To get this:
21 0 8 7 6 5 5
7 8... (4 Replies)
Hi experts,
I have the following data: I want the last filed in the output.
How to print the last field , It contains the file names and few filenames with white spaces .
-rw-r--r-- 1 root root 0 2010-04-26 16:57 file1 2space_File.txt
-rw-r--r-- 1 root root 0 2010-04-26... (2 Replies)
I think I must be missing something obvious but I have a file containing a list of files and paths, some with wildcard, others with spaces. e.g.
/this/is/a/file
/this/is/a/directory/
/this/is/a/collection/*
/this/has spaces/in/it
/this/had spaces/and/list/of/files*... (6 Replies)
Discussion started by: mij
6 Replies
LEARN ABOUT DEBIAN
xen-resize-guest
XEN-RESIZE-GUEST(8) Perl Programmers Reference Guide XEN-RESIZE-GUEST(8)NAME
xen-resize-guest - Resize a loopback or LVM based xen guest.
SYNOPSIS
xen-resize-guest [options]
Help Options:
--help Show help information.
--manual Read the manual for this script.
--version Show the version information and exit.
--verbose Show diagnostic output.
General Options:
--add Specify the amount of space to add, e.g. --add=1gb
--dir Specify the path to the loopback image root.
--force Force the resize to happen without a last-chance delay.
--hostname Specify the hostname of the guest to resize.
OPTIONS --add Specify the amount of storage to add to the primary disk.
--dir Specify the directory where the loopback files are based.
--force Don't pause for 10 seconds prior to commencing.
--help Show help information.
--hostname Specify the hostname to delete.
--lvm Specify the volume group to use.
--manual Read the manual for this script.
--version Show the version number and exit.
DESCRIPTION
This tool will ease the resizing of Xen guests, whether they are based
upon loopback files or LVM partitions.
Whilst the process of resizing a guest is pretty simple it can be fiddly
to do the steps correctly in the right order:
1. Shutdown the guest. 2. Unmount the volume, if it is mounted. 3. Add to the space. 4. Check the filesystem. 5. Resize the
filesystem. 6. Restart the guest.
More than once I've heard of users making mistakes and breaking their
filesystems; hence this tool.
AUTHORS
Steve Kemp, http://www.steve.org.uk/
Axel Beckert, http://noone.org/abe/
LICENSE
Copyright (c) 2005-2009 by Steve Kemp, (c) 2010 by The Xen-Tools Development Team. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The LICENSE file contains the
full text of the license.
4.3.1 2012-06-30 XEN-RESIZE-GUEST(8)