In the above example, the find is launched for each and every nodes (not optimal).
So another way that "may" be faster (but ok, it may depends on some other stuff off course) is to generate a big list of inode/file onceand then grep the matching inode from it
or
and the grep the filename from that list based on inode matching.
I have a program to scan the log files and I want to pipe the output to 'less'.
I want to create an alias such that following are equivalent
scanlog chunky.lst = /udd/n2man/utils/scanlog chunky.lst|less
where chunky is user supplied file which can change.
Is this possible as an alias or... (1 Reply)
Hi,
I need to login to a remote server.
Go to a particular path.
Get the lists of files on that path.There may be n number of files.
I need to delete only those files from above created list which are 7 days older.
I have achieved above using ftp protocol, but now the constraint has... (0 Replies)
Hello Can you please help and check what im missing on script below
the goal is to delete the old files more than 7 days old but not the excluded file list inside excluded.dat file
#!/bin/sh
EXCLUDE=/path/to/exclude/exclude.dat
FIND=/bin/find
for xfile in '(read $EXCLUDE)'
do
$FIND... (9 Replies)
I have written this C++ program and I am using getopt_long and want to chech when the user supplies the arguments so that I can put a default or otherwise.
Currently I am using hasargv or Pc.get_string("key",s), Pc.get_real("key",s), etc
to detect whether the user supplied a value.
For... (3 Replies)
Hello, i'm trying to solve this script.
List, one at a time, all files larger than 100K in the /home/username directory tree. Give the
user the option to delete or compress the file, then proceed to show the next one. Write to a
logfile the names of all deleted files and the deletion times.
I... (7 Replies)
Hi
My directory structure is as below.
dir1, dir2, dir3
I have the list of files to be deleted in the below path as below.
/staging/retain_for_2years/Cleanup/log $ ls -lrt
total 0
drwxr-xr-x 2 nobody nobody 256 Mar 01 16:15 01-MAR-2015_SPDBS2
drwxr-xr-x 2 root ... (2 Replies)
I need to list and delete all files in current older which are olderthan 7 days. But my file names have white spaces. Before deleting I want to list all the files, so that I can verify.find . -type f -mtime +7 | xargs ls -l {}
But the ls command is the working on the files which have white... (16 Replies)
In unix systems I can call `file` to return me the file type.
file cel.vik
$ cel.vik: ASCII text
How can I append additional information when I create a file such that when I call `file` it returns me that additional information. (2 Replies)
Discussion started by: kristinu
2 Replies
LEARN ABOUT CENTOS
xfs_ncheck
xfs_ncheck(8) System Manager's Manual xfs_ncheck(8)NAME
xfs_ncheck - generate pathnames from i-numbers for XFS
SYNOPSIS
xfs_ncheck [ -i ino ] ... [ -f ] [ -s ] [ -l logdev ] device
xfs_ncheck -V
DESCRIPTION
xfs_ncheck with no -i arguments generates an inode number and pathname list of all files on the given filesystem. Names of directory files
are followed by /.. The output is not sorted in any particular order. The filesystem to be examined is specified by the device argument,
which should be the disk or volume device for the filesystem. Filesystems stored in files can also be checked, using the -f flag.
OPTIONS -f Specifies that the filesystem image to be processed is stored in a regular file at device (see the mkfs.xfs -d file option). This
might happen if an image copy of a filesystem has been made into an ordinary file.
-l logdev
Specifies the device where the filesystem's external log resides. Only for those filesystems which use an external log. See the
mkfs.xfs -l option, and refer to xfs(5) for a detailed description of the XFS log.
-s Limits the report to special files and files with setuserid mode. This option may be used to detect violations of security pol-
icy.
-i ino Limits the report to only those files whose inode numbers follow. May be given multiple times to select multiple inode numbers.
-V Prints the version number and exits.
If the filesystem is seriously corrupted, or very busy and looks like it is corrupt, a message of the form that would be generated by
xfs_check(8) may appear.
xfs_ncheck is only useful with XFS filesystems.
SEE ALSO mkfs.xfs(8), xfs_check(8), xfs(5).
xfs_ncheck(8)