04-10-2002
If you need to list only top 10 files in an directory, then -
ls -l | head -11
you can also use - "ls -lt | head -11" for viewing 10 recently modified files.
Hope this is useful.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
i would like to see an unix screen shot if anyone could take a screen shot of unix (7 Replies)
Discussion started by: royal
7 Replies
2. Shell Programming and Scripting
Hi,
I need to get some files from a server via ftp. normaly I use following scrip, it is worrking fine.
cd dir_name
ftp -v -n "10.76.170.17" << cmd
user "rbi" "rbi"
cd recordreceive
prompt... (0 Replies)
Discussion started by: maheshsri
0 Replies
3. Shell Programming and Scripting
i have a file called file1
cat file1
i am namish
namish lives in India
India and namish both are good.
I want to delete all the occurences of namish in one shot,if i do it with sed i guess all the lines will be deleted containing the pattern.Suggest me any idea without AWK.
Thanks... (6 Replies)
Discussion started by: namishtiwari
6 Replies
4. AIX
can any one give me a script which take a snap shot of Topas at a fix interval of 15min and save it in a perticular file!!!!!!!! (6 Replies)
Discussion started by: abhishek27
6 Replies
5. Shell Programming and Scripting
Okay, so im setting up a script to start my internet dependent scripts once I am connected to the net. It got complicated because of the different networks I frequent but it goes something like this:
n=1
iwconfig wlan0 > wireless.txt
m= grep -c MGHS /home/jake/Scripts/wireless.txt
o= grep -c... (7 Replies)
Discussion started by: arcnsparc
7 Replies
6. Shell Programming and Scripting
i have a dir called logs. In it i have some 350 files how to move all those files from directory logs to a new dir called archive
I want to do it in single shot
Below the command i m trying but not getting
find . -name "CurrentCollector*" -exec mv {} archive \;... (2 Replies)
Discussion started by: ali560045
2 Replies
7. Shell Programming and Scripting
i have a directory in which i have Multiple files:
Following are they====
-rw-r--r-- 1 root root 886 Jan 21 16:38 trunkn.xsd
-rw-r--r-- 1 root root 244 Jan 21 16:38 trunknameCache.xml
-rw-r--r-- 1 root root 1240 Jan 21 16:38 subscribercache.xsd
-rw-r--r-- 1 root ... (1 Reply)
Discussion started by: Aditya.Gurgaon
1 Replies
8. Shell Programming and Scripting
Is this possible?
#!/bin/ksh
for file in `*.idlesince`
do
while read inter time
do
printf "%s %s\n" "${inter}" "$(perl -e 'print scalar localtime('"${time}"') . "\n";')" >> "${file}.done"
done < "${file}"
done
The error I get is
line 9: router.idlesince: command not... (1 Reply)
Discussion started by: mrlayance
1 Replies
9. Shell Programming and Scripting
Hi All,
requirement is to find and remove the files from sub directories but it should exclude the files from parent directory.
At present i am using the below one but it finds and remove files from both parent and sub directories.
find ${PATH} -type f \( -name securitas\* -o -name \*gz... (1 Reply)
Discussion started by: Naveenkk
1 Replies
LEARN ABOUT CENTOS
set_robust_list
GET_ROBUST_LIST(2) Linux System Calls GET_ROBUST_LIST(2)
NAME
get_robust_list, set_robust_list - get/set list of robust futexes
SYNOPSIS
#include <linux/futex.h>
#include <syscall.h>
long get_robust_list(int pid, struct robust_list_head **head_ptr,
size_t *len_ptr);
long set_robust_list(struct robust_list_head *head, size_t len);
Note: There are no glibc wrappers for these system calls; see NOTES.
DESCRIPTION
The robust futex implementation needs to maintain per-thread lists of robust futexes which are unlocked when the thread exits. These lists
are managed in user space; the kernel is notified about only the location of the head of the list.
The get_robust_list() system call returns the head of the robust futex list of the thread whose thread ID is specified in pid. If pid is
0, the head of the list for the calling thread is returned. The list head is stored in the location pointed to by head_ptr. The size of
the object pointed to by **head_ptr is stored in len_ptr.
The set_robust_list() system call requests the kernel to record the head of the list of robust futexes owned by the calling thread. The
head argument is the list head to record. The len argument should be sizeof(*head).
RETURN VALUE
The set_robust_list() and get_robust_list() system calls return zero when the operation is successful, an error code otherwise.
ERRORS
The set_robust_list() system call can fail with the following error:
EINVAL len does not match the size of structure struct robust_list_head expected by kernel.
The get_robust_list() system call can fail with the following errors:
EPERM The calling process does not have permission to see the robust futex list of the thread with the thread ID pid, and does not have
the CAP_SYS_PTRACE capability.
ESRCH No thread with the thread ID pid could be found.
EFAULT The head of the robust futex list can't be stored at the location head.
VERSIONS
These system calls were added in Linux 2.6.17. No library support is provided; use syscall(2).
NOTES
These system calls are not needed by normal applications. No support for them is provided in glibc. In the unlikely event that you want
to call them directly, use syscall(2).
A thread can have only one robust futex list; therefore applications that wish to use this functionality should use the robust mutexes pro-
vided by glibc.
SEE ALSO
futex(2)
Documentation/robust-futexes.txt and Documentation/robust-futex-ABI.txt in the Linux kernel source tree
COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2012-07-13 GET_ROBUST_LIST(2)