02-09-2013
Here's another tip that may apply for this:
Using "cd -" will bring you back to whatever directory you were in before your current directory.
Hope that helps
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Is this possible? Let me know If I need specify further on what I am trying to do- I just want to spare you the boring details of my personal file management.
Thanks in advance-
Brian- (2 Replies)
Discussion started by: briandanielz
2 Replies
2. Shell Programming and Scripting
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
I Need help for one requirement,
I want to move the latest/Older file in the folder to another file. File have the datetimestamp in postfix.
Example:
Source Directory : \a
destination Directory : \a\b
File1 : xy_MMDDYYYYHHMM.txt (xy_032120101456.txt)
File2: xy_MMDDYYYYHHMM.txt... (1 Reply)
Discussion started by: pp_ayyanar
1 Replies
4. Shell Programming and Scripting
Can somebody help me with this? I'm sure it's a no-brainer if you know awk... but I don't.
Input:
Blah
Blah
Me love you
long time
Blah
Blah
awk magic with 'long time'
==>
Output:
Blah
Blah
Me love you long time (0 Replies)
Discussion started by: Ryan.
0 Replies
5. UNIX for Dummies Questions & Answers
Hi,
need to zip all files in a directory and move to another directory after the zip..
i am using this one but didnt help me...
zip -r my_proj_`date +%Y%m%d%H%MS`.zip /path/my_proj
mv in_proj_`date +%Y%m%d%H%M%S`.zip /path/source/
i am trying to zip all the files in my_proj... (0 Replies)
Discussion started by: dssyadav
0 Replies
6. Shell Programming and Scripting
Hi all,
i have a folder, with tons of files containing as following,
on /my/folder/jobs/
some_name_2016-01-17-22-38-58_some name_0_0.zip.done
some_name_2016-01-17-22-40-30_some name_0_0.zip.done
some_name_2016-01-17-22-48-50_some name_0_0.zip.done
and these can be lots of similar files,... (6 Replies)
Discussion started by: charli1
6 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
Daily i am doing the house keeping in one of my server and manually moving the files which were older than 90 days and moving to destination folder.
using the find command . Could you please assist me how to put the automation using the shell script .
... (11 Replies)
Discussion started by: venkat918
11 Replies
8. Shell Programming and Scripting
Hi All,
We have main directory called "head"
under this we have several sub directories and under these directories we have sub directories.
My requirement is I have to find the SQL files which are having the string "procedure" under "head" directory and sub directories as well.
And create... (14 Replies)
Discussion started by: ROCK_PLSQL
14 Replies
9. Shell Programming and Scripting
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
MKNODAT(2) Linux Programmer's Manual MKNODAT(2)
NAME
mknodat - create a special or ordinary file relative to a directory file descriptor
SYNOPSIS
#include <fcntl.h> /* Definition of AT_* constants */
#include <sys/stat.h>
int mknodat(int dirfd, const char *pathname, mode_t mode, dev_t dev);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
mknodat():
Since glibc 2.10: _XOPEN_SOURCE >= 700 || _POSIX_C_SOURCE >= 200809L
Before glibc 2.10: _ATFILE_SOURCE
DESCRIPTION
The mknodat() system call operates in exactly the same way as mknod(2), except for the differences described in this manual page.
If the pathname given in pathname is relative, then it is interpreted relative to the directory referred to by the file descriptor dirfd
(rather than relative to the current working directory of the calling process, as is done by mknod(2) for a relative pathname).
If pathname is relative and dirfd is the special value AT_FDCWD, then pathname is interpreted relative to the current working directory of
the calling process (like mknod(2)).
If pathname is absolute, then dirfd is ignored.
RETURN VALUE
On success, mknodat() returns 0. On error, -1 is returned and errno is set to indicate the error.
ERRORS
The same errors that occur for mknod(2) can also occur for mknodat(). The following additional errors can occur for mknodat():
EBADF dirfd is not a valid file descriptor.
ENOTDIR
pathname is relative and dirfd is a file descriptor referring to a file other than a directory.
VERSIONS
mknodat() was added to Linux in kernel 2.6.16.
CONFORMING TO
POSIX.1-2008.
NOTES
See openat(2) for an explanation of the need for mknodat().
SEE ALSO
mknod(2), openat(2), path_resolution(7)
COLOPHON
This page is part of release 3.25 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 2009-12-13 MKNODAT(2)