Hello everyone, here's the scenario
I have two files, each one has around 1,300,000 lines and each line has a column (phone numbers). I have to get the phones that are in file1 but not in file2. I can get these phones trough Oracle but my boss does not want that so he gave me the files with the... (4 Replies)
Hi power user,
if I have this file:
file1.txt:
1111
1111
2222
2222
3333
3333
3333
4444
4444
4444
when I run the
sort file1.txt | uniq > data1.txt
the result is (2 Replies)
So i have about 600gb of data.. in which there are alot of directories and alot of files.. Im trying to put this on a ftp server.. So i want to set the permissions on the directories to be 755 and the permission on the files to be 644. So i used:
find . -type d -exec chmod 755 {}\;
and
find .... (6 Replies)
Hi
This is the list file that i have :
The files is more than this.
I will rename one by one file become like this :
So just change the time stamp 200906 become 200905.
Is it possible using script ?
Thanks (3 Replies)
Hello, I have about 3400 files in a tree structure (about 80% are html files).
1. I need to modify every html file to remove <p> style and old things like font attribute and add another style.
2. I need to change the root of all links that are in the html. e.g. change /old/path/ to /new/path... (1 Reply)
hi guys
I have suse 11 sp1 and I have a lot of warn file filling / these are under /var/log
there's this big one
-rw-r----- 1 root root 3.9G Feb 1 10:28 warn
warn: ASCII text
and the others that are about 2.5 to 3MB - they are about 130 warn-*.bz2
-rw-r----- 1 root root 3.9G Feb... (2 Replies)
Hi all,
I have a many folders with zipped files in them. The zipped files are txt files from different folders. The txt files have the same names. If i try to
find . -type f -name "*.zip" -exec cp -R {} /myhome/ZIP \; it fails since the ZIP files from different folders have the same names and... (2 Replies)
I have a lot number audio files in the MP3 proprietary format, I want to convert them to 'opus' the free and higher quality format, with keep metadata also.
My selection command-line programs are SoX (Sound eXchange) for convert MP3 files to 'AIFF' format in order to keep quality and metadata*... (1 Reply)
Hi,
I have a huge structure of directories and subdirectories contsining some data. The lowest folders contain a file "image.png" which need to be converted to "folder.jpg". But how can I do that for all these files automatically? That's what I alredy have
find /path -type f -name... (1 Reply)
Hey guys,
I have wrote the following script to apply a module named "trinity" on my files. (it takes two input files and spit a trinity.fasta as output)
#!/bin/bash -l
#SBATCH -p node
#SBATCH -A <projectID>
#SBATCH -n 16
#SBATCH -t 7-00:00:00
#SBATCH --mem=128GB
#SBATCH --mail-type=ALL... (1 Reply)
Discussion started by: @man
1 Replies
LEARN ABOUT ULTRIX
rename
rename(2) System Calls Manual rename(2)Name
rename - change the name of a file
Syntax
rename(from, to)
char *from, *to;
Description
The system call causes the link named from to be renamed to. If to exists, then it is first removed. Both from and to must be of the same
type (that is, both directories or both nondirectories) and must reside on the same file system.
The system call guarantees that an instance of to will always exist, even if the system should crash in the middle of the operation.
Return Values
A zero (0) value is returned if the operation succeeds. Otherwise returns -1, and the global variable errno indicates the reason for the
failure.
Restrictions
The system can deadlock if a loop in the file system graph is present.and two processes issue the call at the same time. For example, sup-
pose a directory, contains a file, Suppose that file is hard-linked to a directory, and the directory contains a file, If is hard-linked to
a loop exists. Now suppose one process issues the following call:
rename (dirname/filename secondir/secondfile)
At the same time, another process issues the following call:
rename (secondir/secondfile dirname/filename)
In this case, the system can deadlock. The system administrator should replace hard links to directories with symbolic links.
Diagnostics
The system call fails and neither of the argument files are affected under the following conditions:
[ENOTDIR] A component of either path prefix is not a directory.
[ENOENT] A component of the from path does not exist, or a path prefix of to does not exist.
[ENOENT] Either from or to points to an empty string and the environment defined is POSIX or SYSTEM_FIVE.
[EACCES] A component of either path prefix denies search permission.
[EPERM] The to file exists, the directory containing from is marked sticky, and neither the containing directory nor the to direc-
tory is owned by the effective user ID.
[EPERM] The directory containing from is marked sticky, and neither the containing directory nor the from directory is owned by the
effective user ID.
[EXDEV] The link named by to and the file named by from are on different logical devices (file systems). Note that this error code
is not returned if the implementation permits cross-device links.
[EACCES] The requested link requires writing in a directory with a mode that denies write permission.
[EROFS] The requested link requires writing in a directory on a read-only file system.
[EFAULT] The path points outside the process's allocated address space.
[EINVAL] The from is a parent directory of to, or an attempt is made to rename dot (.) or dot-dot (..).
[ENAMETOOLONG] A component of either pathname exceeded 255 characters, or the entire length of either pathname exceeded 1023 characters.
[ELOOP] Too many symbolic links were encountered in translating either pathname.
[ENOTDIR] The from is a directory, but to is not a directory.
[EISDIR] The to is a directory, but from is not a directory.
[ENOSPC] The directory in which the entry for the new name is being placed cannot be extended, because there is no space left on the
file system containing the directory.
[EDQUOT] The directory in which the entry for the new name is being placed cannot be extended, because the user's quota of disk
blocks on the file system containing the directory has been exhausted.
[EIO] An I/O error occurred while making or updating a directory entry.
[ENOTEMPTY] The to is a directory and is not empty.
[EBUSY] The directory named by from or to is a mount point.
See Alsoopen(2)rename(2)