Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I want to use git for my sites. So I understand that I have to use SSH and initialize git in the folder. But I can't find those files and want to know what is the path for those files?
something I found, If you have PHP then you can use this to get absolute path
<?php
$path = getcwd();
echo "This Is Your Absolute Path: ";
echo $path;
?>
example :- /home/user/public_html/test/test.php.
refrence :- Check this
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 months ago.
Improve this question
Is there any way I can integrate cd command with read?
read -p "location" loc
cd /home/dir/$loc
Yes, you can; it's not pretty, but it works. :)
cd /home/dir/$( read -p "location" loc; echo $loc)
It's also a bit costly as it invokes a sub-shell.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I'm trying to make cross compiler. And I commend like tar xvjf arm-linux-gcc-3.3.2.tar.bz2. But when ls /usr/local/arm there is nothing. arm directory doesn't exsist.... I dont know what to do.....
The command that you have there:
tar xvjf arm-linux-gcc-3.3.2.tar.bz2
extracts that archive within the directory you are currently in. So, if you expect things to show in /usr/local/arm ... you have to copy them there!
Thats about it - see here!
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
My requirement is I will have xml and pdf files like pairs.(e.g.,file1.xml, file1.pdf and file2.xml,file2.pdf) in same folder.
I need to check for xml files which are not having pdf pair and move them to different folder.(e.g., if file3.xml doesn't have file3.pdf, I need to move it to different folder).
Please answer me the shell script to do get this functionality done.
You can remove the extension using parameter expansion:
#! /bin/bash
for file in *.xml ; do
if [[ ! -f ${file%.xml}.pdf ]] ; then
mv "$file" folder/
fi
done
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
like if I'm in a directory called makefile_assignment, what command would give me the higher up directories and display it like
/home/linux/ieng6/cs80w/public/makefile_assignment
I believe you're looking for:
pwd
Just the environment variable of $PWD
echo $PWD
The pwd command is what you are looking for.
The command is pwd (present working directory).
Usually, echo $PWD also works and produces the same answer.
pwd #present working directory
cd / #to your root directory
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I've worked all night on this, but haven only solved part of the problem. I am trying to copy all files using the * wildcard that contain the word file in the filename into the work directory.
try doing this :
cp *file* ./work/
cp *file* work/
Is this homework?