I need to copy a file from a windows share directory to AIX box.
I am not able to get into windows share directory when i have connected to AIX box.
Can someone please help as which unix commands to use to use to login into windows share directory so that i can copy the file and paste to AIX box
You can copy by using nfsshare. Open nfsshare in windows and mount it in aix.
smbclient (if installed):
$ smbclient //host/share
Enter password
smb: \> help
Related
I am new to these forums and to using Ubuntu and linux and UNIX. I really need some help here. I hope I haven't shot myself in the foot already. I have been trying to complete a UNIX carpentry lesson on the internet for an assignment. I am learning the basics about UNIX. I am not using a Mac, I am using a PC that I did not configure in any way (maybe that's my problem). I am using windows 10 on a lenovo and trying to the command prompt on Ubuntu to find my desktop where a file called "data-shell" is located. The problem: IT IS NOT FINDING THE DESKTOP. Upon further inspection, I have been looking through the location of my desktop and "data-shell" file and found it in the Users location under a number 12094, which I am assuming is the serial number for the computer. I have NEVER fiddled with the software at all with this computer as it cost me a lot of money, but I really do not want to be stopped in the tracks already. I have the following images numbered in the order that I discovered everything; they are posted here. I would really appreciate the help. P.S.: Since I am using a PC and not mac, I thought I had to use another command line like BASH or the terminal on my PCor doI just use Ubuntu? The UNIX shell is supposed to start with a $, right? Please correct me if I a wrong and thank you for your help
.
linux commands on windows can be ran via cmder or git bash (what i had used in past)
and in linux the desktop is at the path
/home/< username>/Desktop
whereas in windows its
C:\Users<username>\Desktop
both windows (DOS) and ubuntu/mac(linux) environment are entirely different you can directly run commands of one on the other environment, you do need to "setup" that env first if the command is not native to that.
Now, since its assignments that you are doing and all you need is bare-min linux env
you can give https://repl.it/ a try and create a new project in bash
Also, when you install Ubuntu on windows you dont get acces to windows like path, like "C:...", in ubuntu c:\ of windows is mounted to some other path in ubuntu
search on google how to access windows desktop from ubuntu shell after installing ubuntu inside of windows
When using Windows Subsystem for Linux (WSL), your C drive is located under /mnt/c.
Judging from the screenshot, you are user 12094, so you can either accept this, or you need to actually configure your machine. Also if you look in the screenshot you provided, there is a /home folder which I am betting is actually pointing to /mnt/c/, and your home folder will be under /home/12094, which is also the same as what is stored in $HOME.
To find the location of a file called data-shell, you can run the following linux command while in your home folder:
find $HOME -type f -name 'data-shell'
This command recursively searches for files in your home directory, with the name data-shell
My apology for the "newbie trouble" that I created for myself & apology for my poor command of computer lingo
I am running a Windows 7 laptop and have a big text file (~4Gb) that I need to find certain string.
Most programs in Windows 7 cannot handle the task (file too big to open in any program in the Microsoft suite), so I downloaded cygwin and tried to grep the specific string.
The problem is
(a) the 4 Gb file is stored in the desktop of my non-admin account.
(b) I assume cygwin runs in the admin account (although I use the desktop cygwin icon to launch the environment). The reason being that under cygwin, I see the handle A#Admin-THINK (running it on a Lenovo Thinkpad laptop)
grep the file of interest results in "No such file or directory"
I tried to find the path of the file (readlink, realpath) but guess the commands were not applicable here?
Also tried /home/A/file or /home/A/desktop/file but it is clear that my random guess fails.
From windows, the file should be in
C:/Users/non_admin/desktop/folder/file
What would be the right path of the file to grep the string using cygwin ?
You can use /cygdrive to access the Windows filesystem. In your case, try
grep foo /cygdrive/c/Users/non_admin/Desktop/folder/file
From windows, you can get the correct file path from the context menu item Copy as path into the copy/paste buffer.
In Cygwin mintty, use
FilePath=<paste>
where <paste> means to use paste from mintty's context menu to make a variable with the value of that path.
Then use
grep <string> $(cygpath -u "$FilePath")
to search the file. The "'s are in case the file name contains spaces.
HTH
I was using a dual boot system and backing up in Linux my files using rsync and link-dedt and everything was working perfectly. Because the computer is mostly logged in Windows I decided to install cygwin and try to use rsync to do my backups. That way I can have a script that runs automatically every week. However when I tried to continue my backup using link-dest in cygdrive it didn't work. I think is because the files permission are seen differently by cygwin and Linux.
My command was something like:
rsync -av --exclude-from=exclude.txt --progress --link-dest=/cygdrive/e/2016-02-19/ /cygdrive/d/Users/ /cygdrive/e/2016-02-24/
I looked at files that I knew didn't change in the link-dest and source location and everything looks the same except for the file persmission. How can I omit permissions or solve this problem?
Cygwin on windows does cause lots of strange permissions.
If i was backing windows to a linux host, i would use https://acrosync.com/ which is native rsync for windows, unfortunately it does cost money.
We gave up on cygwin rsync partially due to these issues and ended up developing our own windows replication tool http://www.yintersync.net. Its free for non-commercial use.
I have a shared folder on Windows 2008. We are now trying to mount this folder at a client site on Unix AIX 5.3. But we do not know how to do it. What is the mount command and options?
They are using Putty.
Now I'm a complete newbie when it comes to Unix, so please try and keep the Unix bits simple for me :-)
Thanks
Two options
1) The easiest would be to install the bos.cifs fileset and use smit to mount the share as a filesystem: http://www-01.ibm.com/support/docview.wss?uid=isg1fileset-1244257370
2) I would not recommend this for "newbies", but you may have better luck getting this to work by installing samba: www.samba.org
I have a cygwin console running on my windows box, and vim installed and working fine. But when I do an rloging to a server (rlogin server.at.com running unix) my vim command is launching the vi on my remote box. Is there a way to tell cygwin to "tunnel" the text file that I try to open in the rlogin session to a local vim session just as it does with a local file (applies also to my nedit which I dont have in the remote machine but I do in the local one)?
Thanks!
I'm not sure how or if it would work with rlogin but bcvi is SSH-based and allows you to do $ vim filename on the server and open a GVim window on your local machine.
You can also use Vim's default plugin netrw which lets you manage and edit remote files using, among other protocols, rcp:
" manage files
:e rcp://[username#]machinename/path/to/directory/
" edit file
:e rcp://[username#]machinename/path/to/directory/filename
But… is there a reason for using rlogin instead of ssh?