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)
I want a create a file with a specific extension(.done). I am using the command touch. Something Like:
touch basename $UNZIPFILE".done"
It's creating the file but in current directory. I want to create this file in a specific directory.
Is there a option to provide the directory ?
I checked : http://ss64.com/bash/touch.html , but could not figure out.
I'm seeking a way to create directory and change my present working directory to newly created directory just by using a single command. How can I do this?
i.e Instead of doing
user@Computer:~$ mkdir NewDirectory
user@Computer:~$ cd NewDirectory
user@Computer:~/NewDirectory$
I want to do
user@computer:~$ **command** NewDirectory
user@Computer:~/NewDirectory$
What can the command be?
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 am using ubuntu 11.10 and I am trying to create a directory in my home folder from another place without changing any directory.
The way I am currently using from it is :
cd ~
mkdir My_directory_name
but I don't want to use cd command and or any changing directory command. I googled my problem and I didn't find any thing. please help me !
When I create a user with useradd command in centos 5, the home directory is created and its /etc/skel files are copied to that directory but when i give useradd with -doption to some different path to home directory it does not create the skeloton files, like .bachrc, .bash_history etc.
If someone can give a hint so I can resolve this problem.
I have a single directory that contains dozens of directories inside of it.
I'm new to command line and I'm struggling to come up with a command that will zip each sub-directory into a unique sub-directory.zip file.
So in the end my primary directory will be filled with all of my original sub-directories, plus the corresponding .zip files that contain the zipped up content of each sub-directory.
I want sudo to allow me to run a command when my current working directory is, for example, /tmp. Example usage is removing files from /tmp directory, so I am in /tmp ($PWD of shell == /tmp), then I can run, rm -v someuseless.bin (someuseless.bin of course not belongs to me, so I can't remove it).
If it is impossible (I can't find references in sudo manuals), then why?