Sponsored Content
Top Forums UNIX for Advanced & Expert Users Crontab No such file or directory Post 302957837 by cokedude on Thursday 15th of October 2015 06:52:20 PM
Old 10-15-2015
Crontab No such file or directory

I keep getting the crontab No such file or directory error message.

Code:
0,30,31,32,33,34,35,36,37,38,39,40 * * * * "/bin/ps aux --sort -\%mem >> /home/m/bob/cookies"

I have made sure my directory exists.

Code:
find /home/m/bob -iname 'cookies' 2>/dev/null
/home/m/bob/cookies

I am using the full path with ps.

I have backslashed the % sign. I don't know what else to do.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

/bin/sh: /usr/bin/vi: No such file or directory when doing crontab

I just set up an ftp server with Red Hat 5.2. I am doing the work, I'm baby stepping, but it seems like every step I get stuck. Currently, I'm trying to set up a crontab job, but I'm getting the following message: /bin/sh: /usr/bin/vi: No such file or directory. I see that vi exists in /bin/vi,... (3 Replies)
Discussion started by: kwalter
3 Replies

2. Shell Programming and Scripting

Move a file from windows directory to unix directory

Move a file from windows directory to unix directory, is this possible? if it is, can someone help me on this? Thanks! God bless! (1 Reply)
Discussion started by: kingpeejay
1 Replies

3. Shell Programming and Scripting

Crontab and working directory

Hi all I would like to crontab some python script I have. These have the task to write a txt file on the same directory where they are let' say 'scriptFolder'. When I schedule the script execution with crontab the file is printed out somewhere else. Is there any way to tell crontab that for... (2 Replies)
Discussion started by: manustone
2 Replies

4. Shell Programming and Scripting

Grepping file names, comparing them to a directory of files, and moving them into a new directory

got it figured out :) (1 Reply)
Discussion started by: sHockz
1 Replies

5. UNIX for Advanced & Expert Users

"No such file or directory" while running crontab

I am trying to take backup of server. while running manually, script working successfully. while running in crontab its showing "/bin/sh: /webMethod6/CustomMonitoring/scripts/backupWebMethodsCodeBase.sh: No such file or directory" code forbackupWebMethodsCodeBase.sh #!/bin/ksh #Purpose... (8 Replies)
Discussion started by: elango963
8 Replies

6. Shell Programming and Scripting

Change to directory and search some file in that directory in single command

I am trying to do the following task : export ENV=aaa export ENV_PATH=$(cd /apps | ls | grep $ENV) However, it's not working. What's the way to change to directory and search some file in that directory in single command Please help. (2 Replies)
Discussion started by: saurau
2 Replies

7. Shell Programming and Scripting

Shell scripting-I need a script which should watch a directory for a file with specific directory

I need a script which should watch a directory for a file with specific directory. If it finds a file in directory, it should search for few specific keyword in the file. if the keyword exists, it should trim string from specific column. The file should be moved to another directory and the a... (8 Replies)
Discussion started by: akashdeepak
8 Replies

8. Shell Programming and Scripting

Running script in crontab in a specific directory

I am trying to run a script from crontab but the entire script (which is 70+ lines) is written in bash and I need it to run from a certain directory. So when I run it manually I cd to /local/mnt/scr and then type ./reordersc and it works fine. However, I want it to run from the crontab and I... (20 Replies)
Discussion started by: newbie2010
20 Replies

9. Shell Programming and Scripting

Shell script cannot create directory and move the file to that directory

I have a script, which is checking if file exists and move it to another directory if then mkdir -p ${LOCL_FILES_DIR}/cool_${Today}/monthly mv report_manual_alloc_rpt_A_I_ASSIGNMENT.${Today}*.csv ${LOCL_FILES_DIR}/cool_${Today}/monthly ... (9 Replies)
Discussion started by: digioleg54
9 Replies

10. UNIX for Beginners Questions & Answers

How to find and get a file in an entire directory with an excluded directory specified?

How to get a file 'zlib.h' in an entire directory with an excluded directory specified lives under that starting directory by using find command, as it failed on: $ find . -name 'zlib.h' -a -ipath 'CHROME.TMP' -prune -o -print it'll just list entirely up (2 Replies)
Discussion started by: abdulbadii
2 Replies
VOP_READDIR(9)						   BSD Kernel Developer's Manual					    VOP_READDIR(9)

NAME
VOP_READDIR -- read contents of a directory SYNOPSIS
#include <sys/param.h> #include <sys/dirent.h> #include <sys/vnode.h> int VOP_READDIR(struct vnode *vp, struct uio *uio, struct ucred *cred, int *eofflag, int *ncookies, u_long **cookies); DESCRIPTION
Read directory entries. vp The vnode of the directory. uio Where to read the directory contents. cred The caller's credentials. eofflag Return end of file status (NULL if not wanted). ncookies Number of directory cookies generated for NFS (NULL if not wanted). cookies Directory seek cookies generated for NFS (NULL if not wanted). The directory contents are read into struct dirent structures. If the on-disc data structures differ from this then they should be trans- lated. LOCKS
The directory should be locked on entry and will still be locked on exit. RETURN VALUES
Zero is returned on success, otherwise an error code is returned. If this is called from the NFS server, the extra arguments eofflag, ncookies and cookies are given. The value of *eofflag should be set to TRUE if the end of the directory is reached while reading. The directory seek cookies are returned to the NFS client and may be used later to restart a directory read part way through the directory. There should be one cookie returned per directory entry. The value of the cookie should be the offset within the directory where the on-disc version of the appropriate directory entry starts. Memory for the cookies should be allocated using: ...; *ncookies = number of entries read; *cookies = (u_int*)# malloc(*ncookies * sizeof(u_int), M_TEMP, M_WAITOK); ERRORS
[EINVAL] An attempt was made to read from an illegal offset in the directory. [EIO] A read error occurred while reading the directory. SEE ALSO
vnode(9) AUTHORS
This manual page was written by Doug Rabson. BSD
July 24, 1996 BSD
All times are GMT -4. The time now is 11:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy