Linux Command to Print a Directory
location: ubuntuforums.com - date: June 28, 2009
I'm almost embarrassed to ask this:
How do I print the contents of a directory ? ?
I couldn't find anything in Nautilus and I did a man search on; pwd, cat, lpr and ls. Nothing obvious jumped out at me.
I'd like to have a hard copy of some music and movie directories on my hard-drive but can't work out a linux command to do it.
How Do I Go Back A Directory?
location: ubuntuforums.com - date: January 3, 2011
I'm very new to Linux, please go easy on me I...how do I return to a directory in terminal?
How do I return to /home/user/Documents# without having to create a new terminal?
I'm not sure if this is the right place to post this...
Linux command cp producing ommitted directory
location: linuxexchange.com - date: November 21, 2013
I want to place 1 file called "test1.html" in 100 different directories of website.
Directory structure is like the following
/home/domain.com/public_html/ (domain.com name are change for every directory so i use * .
File are here: /root/test1.html
I have try it by : cp test1.html /home/*/public_html/ via root account but give me
cp: omitting directory `/home/domain1.com/public_html/'
cp: omitting directory `/home/domain2.com/public_html/'
and so on.
can anyone help me to place the one file in all domains directory ?
its Centos 5.9
Linux command to move a directory
location: linuxexchange.com - date: October 21, 2015
My old and new directory have same folders and files inside.
mv -if old/* new/*
and get error
mv: cannot move `./xxxxxx' to a subdirectory of itself
How can I move it?
Using Python's os.path, how do I go up one directory?
location: linuxexchange.com - date: January 7, 2014
I recently upgrade Django from v1.3.1 to v1.4.
In my old settings.py I have
TEMPLATE_DIRS = (
os.path.join(os.path.dirname( __file__ ), 'templates').replace('\\', '/'),
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
This will point to /Users/hobbes3/Sites/mysite/templates, but because Django v1.4 moved the project folder to the same level as the app folders, my settings.py file is now in /Users/hobbes3/Sites/mysite/mysite/ instead of /Users/hobbes3/Sites/mysite/.
So actually my question is now twofold:
How do I use os.path to look at a directory one level above from __file__. In other words, I want /Users/hobbes3/Sites/mysite/mysite/settings.py to find /Users/hobbes3/Sites/mysite/templates using relative paths.
Should I be keeping the template folder (which has cross-app templates, like admin, registration, etc.) at the
One command to create a directory and file inside it linux commad
location: linuxexchange.com - date: August 1, 2013
Suppose my current directory is A. I want to create a directory B and a file "myfile.txt" inside B.
How to do that in one command from terminal?
Directory can be nested multiple times. Like i may want to create B/C/D and then "myfile.txt" inside that. I do not also want to repeat the directory part.
Following command will create directory at any level.
mkdir -p B/C/D
mkdir -p B/C/D && touch B/C/D/myfile.txt
will create the directory and the file. But i do not want to repeat the directory part after touch command. It that possible?
How to move one directory back in unix / linux when path contains symbolic links?
- date: January 1, 1970
I have created a symbolic link to a deeply nested directory. Using symbolic link i can move to that directory from my home directory. I want to move one directory back from the target directory but the shell comes back to the home directory.
~]# mkdir -p abc/def/ghi/jkl/mno/pqr
~]# ln -s abc/def/ghi/jkl/mno/pqr/ xyz
~]# cd xyz
xyz]# pwd -P
xyz]# cd ..
What I want to achieve is that when I do cd.. in pqr directory the shell should come to mno directory.
Go back to Previous Directory in Linux using a C program
location: linuxexchange.com - date: July 2, 2012
I am in the directory /home/destination I need to go back to the /home directory. Any ideas on how to implement this using a C-program?
copy multiple directories into another one directory with single cp command
location: linuxquestions.com - date: August 17, 2011
I want to copy multiple directories to another directory,
for example I want to copy directories A,B,C and D to /home/user01/alldirectories.
how should I do with a single cp command?
how do I copy a whoel folder form one directory to another form the command line?
location: linuxquestions.com - date: August 24, 2004
HI im trying to learn how to use the command line in linux and right now im trying to install firefox to the /usr/local directory. Basicaly what im trying to do is copy the folder firefox from /home/me to /usr/local then run the install file in firefox once it is copies over and i want to do all this from the command line with root privelages instead of having to logout of x as user then login to x as root. Thanks,
Page: 1 2 3 4 5 6 7 8 9 10