Tagged Questions
1
vote
2answers
88 views
Merge chunks from multiple files
I need to merge chunks from a few but large files. Each line contains the file name and byte offsets.
# file begin end
foo/a 11970 12010
foo/a 22995 23035
foo/b 45090 45130
foo/b ...
2
votes
1answer
225 views
Create sub-directories and organize files by date
I have some directories of files copied from my security camera that I would like to organize into sub-directories by file date. So for example;
-rwxrwxrwx 0 root root 4935241 Jul 19 2012 ...
1
vote
0answers
84 views
reading from a file and changing its pattern into an array?
I have a CSV file containging entries like this :
ipaddress,VLAN,VLANid
10.192.168.1,vlan-xyz,3
10.192.168.1,vlan-abc,8
10.192.168.1,vlan-mnp,11
10.192.163.24,vlan-llz,3
10.192.163.24,vlan-bbz,5
...
1
vote
1answer
126 views
File is readable by everyone, but I can't open the file
I'm fairly new to Unix and I have written a script:
SERVER="/usr/local/abc/.../somefile.txt"
OPTION="$1"
if [ x$OPTION = "xtitle" ]
then
grep $OPTION $SERVER
exit
fi
As far as I ...
3
votes
4answers
98 views
Unix - how to fetch files based on the part of a filename that is date
Say I have files say like
AA_XX_20111208
AA_XX_20111207
AA_XX_20111206
AA_XX_20111205
AA_XX_20111204
AA_XX_20111203
So using the date part,
how can i fetch previous 2 month files ?
For e.g. this ...
1
vote
1answer
335 views
Reading the contents of the file and splitting using ksh
We're using a ksh script for installing one product.
I've another config file, I'd need to read this configuration file from my main script
Content of the Configuration file:
...
2
votes
1answer
103 views
Distributing thousands of files over subfolders
I have a folder A with hundreds of thousands of files. I would like to move these files to new subfolders S_i, with, say, 100 files in each (the last folder may have less than 100 files)
In other ...
1
vote
1answer
117 views
Outputting last modification date to another file?
I'm trying to read the number of lines in a file, and the last modification date of that file (e.g. if it was last modified Jan 18, 2013, it should output 2013-01-18), then append the data to the ...
0
votes
1answer
243 views
Shell script to delete all files which are older [duplicate]
Possible Duplicate:
Deleting files by age
Write a shell script to delete all the files which are "n" of older that current day, where n can be 3days. 2days, or 1 year etc. The above script ...
0
votes
2answers
82 views
file command + how to view all results from file command
I use the file command in order to verify if file (PATH) is text/ascii file or encrypted file
Because file command have allot of results ( small example in example 1 )
I want to get the all ...
0
votes
1answer
88 views
linux/solaris + manipulation of Standard Output
I run the following line on linux/solaris machine ( all output will write in to /tmp/Log from application.bin )
./application.bin 1>>/tmp/Log
We can see the content of the /tmp/Log file
...
1
vote
1answer
239 views
How to move files with same name and concatenate
My directory structure is given below. I need to move all the folders from Test3 to Test2 and concatenate the files with same names
[jg@hpc Test2]$ tree
.
|-- Sample_1008
| |-- ...
2
votes
4answers
496 views
Get the newest file from directory structure year/month/date/time
I store backups of databases in a directory structure
year/month/day/time/backup_name
an example would be
basics_mini/2012/11/05/012232/RATIONAL.0.db2inst1.NODE0000.20110505004037.001
...
2
votes
2answers
133 views
Create a new link to access all files and folders
I get stuck to create a shell script for a new link something like that
link linkPathName orginalPathName
I want to create a link between a new link and original path; however, both can access ...
2
votes
2answers
185 views
How to make duplicates with different names from a single file? [closed]
I want to duplicate the contents of a file. Suppose there is a file named "Hydrogen.element". I want to duplicate the contents of this file with a different name ie.make another file named ...