You might be better with something like this:-
It uses sed to get the whole file from after the LinesToSkip value. It also assumes that your list of files to rename is a white-space and/or row separated input file.
You may prefer to increment the counter in a different way, but the principle is the same.
I'm looking to determine if I can use a grep command to read file and rename the file based on the first 3 characters of the data in the file.
An example is:
Read FileA
If the first 3 positions of the data in the file are "ITP", then rename the file as FileA_ITP, else if the first 3... (3 Replies)
File.jpg
I want to copy and rename this as 2008-12-02.jpg
I tried this copy File.jpg date '%y-%m-%d-%H:%M:%S'.jpg
This doesnt work.... what do i do? (1 Reply)
Hi,
Found lots of stuff that is close but no cigar...
I have a file ie. a.txt, and I want to copy it to another directory 5000 times and call it:
a1.txt
a2.txt
...
a5000.txt
Struggling to put a loop together in this new world of AIX. please include full script for me to understand... (3 Replies)
hi all,
I have one config folder and updates folder.updates folder contains file tmp_2.0_20201208_45.xml and config folder contains file tmp.xml.When the tmp_2.0_20201208_45.xml file is copied in the config folder the name of this file is changed in config folder again as tmp.xml(old... (8 Replies)
Hi All,
I am very new to shell scripting .
In my current task i want to create .sh file that will rename the existing file with appending _bu in it. And then copy new file .
e.g if i have file linuxFirst.java then i want to rename it to linuxFirst_bu.java ..Then want replace with latest... (1 Reply)
Hello,
I've been searching and reading, but I can't figure out how to solve this problem with my newbie skills.
In my directory, I have a list of files (see dirlist.txt attachment) that I need to merge and rename. I have part of the code of the code figured out (see below). However, I... (3 Replies)
Hi Guys,
I have the following problem. I have original file (org.txt) that looks like this
module v_1(.....)
//arbitrary number of text lines
endmodule
module v_2(....)
//arbitrary number of text lines
endmodule
module v_3(...)
//arbitrary number of text lines
endmodule
module... (6 Replies)
Hi All,
My requirement is as follows:
A file (say abc) will be having list of the .txt file names. I need to read this abc file line by line and rename the .txt file names inside it and move them to other folder/path.
Eg:
abc
-------
file1.txt
file2.txt
file3.txt
Output (should... (1 Reply)
I have bunch of files in my source folder like below and every day based on date I am receiving file ex: Nov 28,Nov 29,Nov 30 ...
-rw-rw-r--+ 1 root root 20 Nov 27 06:00 aaaa27.txt
-rw-rw-r--+ 1 root root 20 Nov 28 06:00 aaaa28.txt
-rw-rw-r--+ 1 root root 20 Nov 29 06:00 aaaa29.txt
I... (4 Replies)
I have a specific set (all ending with .bam) of downloaded files in a directory /home/cmccabe/Desktop/NGS/API/2-15-2016. What I am trying to do is use a match to $2 in name to rename the downloaded files. To make things a more involved the date of the folder is unique and in the header of name... (1 Reply)
Discussion started by: cmccabe
1 Replies
LEARN ABOUT CENTOS
alter_tablespace
ALTER TABLESPACE(7) PostgreSQL 9.2.7 Documentation ALTER TABLESPACE(7)NAME
ALTER_TABLESPACE - change the definition of a tablespace
SYNOPSIS
ALTER TABLESPACE name RENAME TO new_name
ALTER TABLESPACE name OWNER TO new_owner
ALTER TABLESPACE name SET ( tablespace_option = value [, ... ] )
ALTER TABLESPACE name RESET ( tablespace_option [, ... ] )
DESCRIPTION
ALTER TABLESPACE changes the definition of a tablespace.
You must own the tablespace to use ALTER TABLESPACE. To alter the owner, you must also be a direct or indirect member of the new owning
role. (Note that superusers have these privileges automatically.)
PARAMETERS
name
The name of an existing tablespace.
new_name
The new name of the tablespace. The new name cannot begin with pg_, as such names are reserved for system tablespaces.
new_owner
The new owner of the tablespace.
tablespace_parameter
A tablespace parameter to be set or reset. Currently, the only available parameters are seq_page_cost and random_page_cost. Setting
either value for a particular tablespace will override the planner's usual estimate of the cost of reading pages from tables in that
tablespace, as established by the configuration parameters of the same name (see seq_page_cost, random_page_cost). This may be useful
if one tablespace is located on a disk which is faster or slower than the remainder of the I/O subsystem.
EXAMPLES
Rename tablespace index_space to fast_raid:
ALTER TABLESPACE index_space RENAME TO fast_raid;
Change the owner of tablespace index_space:
ALTER TABLESPACE index_space OWNER TO mary;
COMPATIBILITY
There is no ALTER TABLESPACE statement in the SQL standard.
SEE ALSO
CREATE TABLESPACE (CREATE_TABLESPACE(7)), DROP TABLESPACE (DROP_TABLESPACE(7))
PostgreSQL 9.2.7 2014-02-17 ALTER TABLESPACE(7)