04-13-2015
Convert
Hello,
thanks . I tried the command stat -c "%a %n" but it didn't work.
So i'm checking
Thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Could anyone tell me how to write a C shell script according to the following requirement.
Write a C shell script convertmin which will read in a number, thought of as representing minutes, and print out the number of hours/minutes it represents so:
Note: you are required to check exception... (1 Reply)
Discussion started by: Ringo
1 Replies
2. SuSE
Hello, I am running a Suse Linux server and I want to set up a NFS Server for a few Unix machines. For the root account at the unix client it works fine but it doesn't work for other users who have no root rights.
I've used the no_root_squash and the rw option in the etc/export file. My folder... (7 Replies)
Discussion started by: Ald-Edv
7 Replies
3. Shell Programming and Scripting
I am using awk in my .ksh script but when I am trying to run in windows
its not recognising awk part of the ksh script , even when I changed it to gawk it does not work, this is how my .ksh and .bat files look like.
thanx.
#!/bin/ksh
egrep -v "Rpt 038|PM$|Parameters:|Begin |Date: |End... (1 Reply)
Discussion started by: 2.5lt V8
1 Replies
4. UNIX for Dummies Questions & Answers
Hi,
Is it true that if I am not the root I can not select access permissions to a file that I own so that my friend (who also isn't the root) can access that file?
And is it true that the only way to accomplish it is to ask the root to "put" my friend into "my" group? Then I could simply set... (1 Reply)
Discussion started by: rudo
1 Replies
5. Shell Programming and Scripting
Hi,
I have these lines in a unix script:
FILEONE = /<filepath1>/<filename1.txt>
FILENEW = /<filepath2>/<filename2.txt>
head -5 $FILEONE | sed '1d' > $FILENEW
PARAM1 = `cat $FILENEW | awk '{print $2;}' `
echo "Param1 Value: $PARAM1"
What's the correct syntax of the above lines if same... (2 Replies)
Discussion started by: gholdbhurg
2 Replies
6. Shell Programming and Scripting
hi ,
i need a script to convert number into hexadecimal base
for example: 237=>ED
it s very important for me thank you in advance for you help (5 Replies)
Discussion started by: mips
5 Replies
7. Shell Programming and Scripting
Hi All,
I have one shell script and like to convert into GUI for user creation..Any way to convert shell script into php?
Please find the below for my script.
$ more user.sh
#!/bin/ksh
set -x
pwfile="/etc/passwd" shadowfile="/etc/shadow"
gfile="/etc/group"
######Want to check... (0 Replies)
Discussion started by: susindram
0 Replies
8. UNIX for Dummies Questions & Answers
Hello experts,
i am a Unix beginner and to test the rules of file rights (rwx)
i created the file
/root/testdir/subdir/test.sh
and set the rights of testdir,subdir, test.sh (using chmod) to various configurations in order to get an idea
in which case you need which rights. Test commands... (5 Replies)
Discussion started by: mike_bn
5 Replies
9. Shell Programming and Scripting
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)
Discussion started by: temp-usr
1 Replies
10. UNIX for Beginners Questions & Answers
I have variable that contains multiple values of number and also include overpunch(i.e. # $ % etc) character so we want to replace it with numbers.
here are the example:
Code:
11500#.0#
28575$.5$
527#.7#
42".2"
2794 .4
2279!.9!
1067&.7&
926#.6#
2279!.9!
885".5"
11714$.4$
27361'.1'... (1 Reply)
Discussion started by: nadeemrafikhan
1 Replies
LEARN ABOUT CENTOS
tcl_access
Tcl_Access(3) Tcl Library Procedures Tcl_Access(3)
__________________________________________________________________________________________________________________________________________________
NAME
Tcl_Access, Tcl_Stat - check file permissions and other attributes
SYNOPSIS
#include <tcl.h>
int
Tcl_Access(path, mode)
int
Tcl_Stat(path, statPtr)
ARGUMENTS
char *path (in) Native name of the file to check the attributes of.
int mode (in) Mask consisting of one or more of R_OK, W_OK, X_OK and F_OK. R_OK, W_OK and X_OK request checking
whether the file exists and has read, write and execute permissions, respectively. F_OK just
requests checking for the existence of the file.
struct stat *statPtr (out) The structure that contains the result.
_________________________________________________________________
DESCRIPTION
As of Tcl 8.4, the object-based APIs Tcl_FSAccess and Tcl_FSStat should be used in preference to Tcl_Access and Tcl_Stat, wherever possi-
ble.
There are two reasons for calling Tcl_Access and Tcl_Stat rather than calling system level functions access and stat directly. First, the
Windows implementation of both functions fixes some bugs in the system level calls. Second, both Tcl_Access and Tcl_Stat (as well as
Tcl_OpenFileChannelProc) hook into a linked list of functions. This allows the possibility to reroute file access to alternative media or
access methods.
Tcl_Access checks whether the process would be allowed to read, write or test for existence of the file (or other file system object) whose
name is pathname. If pathname is a symbolic link on Unix, then permissions of the file referred by this symbolic link are tested.
On success (all requested permissions granted), zero is returned. On error (at least one bit in mode asked for a permission that is
denied, or some other error occurred), -1 is returned.
Tcl_Stat fills the stat structure statPtr with information about the specified file. You do not need any access rights to the file to get
this information but you need search rights to all directories named in the path leading to the file. The stat structure includes info
regarding device, inode (always 0 on Windows), privilege mode, nlink (always 1 on Windows), user id (always 0 on Windows), group id (always
0 on Windows), rdev (same as device on Windows), size, last access time, last modification time, and creation time.
If path exists, Tcl_Stat returns 0 and the stat structure is filled with data. Otherwise, -1 is returned, and no stat info is given.
KEYWORDS
stat, access
Tcl 8.1 Tcl_Access(3)