Synopsis
cd [-L|-P] [DIRECTORY]
cd -
Description
The cd builtin command is used to change the current working directory
* to the given directory (cd DIRECTORY)
* to the previous working directory (cd -) as saved in the OLDPWD shell variable
* to the user's home directory as specified in the HOME environment variable (when used without a DIRECTORY argument)
Synopsis
cd [-L|-P] [DIRECTORY]
cd -
Description
The cd builtin command is used to change the current working directory
* to the given directory (cd DIRECTORY)
* to the previous working directory (cd -) as saved in the OLDPWD shell variable
* to the user's home directory as specified in the HOME environment variable (when used without a DIRECTORY argument)
Recently I had to change the folder permissions of /usr folder. Now the whole sudo is not working.
This question is kind of a phase II to the first question I posted at here
I have a directory that contains a bunch of sub-directories, .zip files, and other random files not contained within a sub-directory.
I'd like a command line script to remove all sub-directories from within the parent directory, but keep all zip files and loose files that don't belong to any sub-directories.
I want to be able to run a command, it fails cause it doesn't have proper permissions. Then I can write "please" to sudo the command I just ran.
Here's what I want to do in the terminal:
$ run command
"you don't have access to do that"
$ please
"ran successfully"
I saw that !!
I'm using virtual file-system in /proc/ to print out current working directory (CWD):
Code:
ls /proc/$PID/cwd # part of an argument to printf (full printf below)
Now, some processes complain about SUDO privileges (e.g. init: ls: cannot access /proc/1/cwd: Permission denied).
Is it possible to know beforehand if action/command will require SUDO?
Quite often, the script I want to execute is not located in my current working directory and I don't really want to leave it.
Is it a good practice to run scripts (BASH, Perl etc.) from another directory? Will they usually find all the stuff they need to run properly?
If so, what is the best way to run a "distant" script? Is it
.
If I set the current/working directory (navigating to it using cd) to some particular directory and then type:
rm *.xvg
What will this command do?
Hi,
I have to find specific files only in the current directory...not in the sub directories.
But when I use Find command ... it searches all the files in the current directory as well as in the subdirectories. I am using AIX-UNIX machine.Please help..
I am using the below command. And i am able to list files only in the directory but not in sub-directories.
find . ! -name .